用cookiecutter 创建模板的时候报错,我的centos上装了git的,这是啥原因?
来源:4-1 Cookiecutter安装和使用(附文档)
爱幻想的乐天派
2019-04-30
5回答
-
Jack
2019-07-04
cookiecutter-django.tar.gz 包我放在群共享里,大家上传到服务器,按如下步骤操作就行了。
[devops@DZBXDEV02 ~]$ ll
total 1463934
-rw-rw-r-- 1 devops devops 1463934 Jul 4 14:30 cookiecutter-django.tar.gz
[devops@DZBXDEV02 ~]$
[devops@DZBXDEV02 ~]$ tar -xf cookiecutter-django.tar.gz # 解压
[devops@DZBXDEV02 ~]$ ll
total 1467930
drwxrwxr-x 7 devops devops 4096 Jul 4 14:29 cookiecutter-django
-rw-rw-r-- 1 devops devops 1463934 Jul 4 14:30 cookiecutter-django.tar.gz
[devops@DZBXDEV02 ~]$ # 我cookiecutter安装在/usr/local/python3/bin/cookiecutter
[devops@DZBXDEV02 ~]$ /usr/local/python3/bin/cookiecutter cookiecutter-django
project_name [My Awesome Project]: test
project_slug [test]:
description [Behold My Awesome Project!]:
author_name [Daniel Roy Greenfeld]:
domain_name [example.com]:
email [daniel-roy-greenfeld@example.com]:
version [0.1.0]:
Select open_source_license:
1 - MIT
2 - BSD
3 - GPLv3
4 - Apache Software License 2.0
5 - Not open source
Choose from 1, 2, 3, 4, 5 (1, 2, 3, 4, 5) [1]: 1
timezone [UTC]:
windows [n]:
use_pycharm [n]: y
use_docker [n]: n
Select postgresql_version:
1 - 11.3
2 - 10.8
3 - 9.6
4 - 9.5
5 - 9.4
Choose from 1, 2, 3, 4, 5 (1, 2, 3, 4, 5) [1]: 1
Select js_task_runner:
1 - None
2 - Gulp
Choose from 1, 2 (1, 2) [1]: 1
Select cloud_provider:
1 - AWS
2 - GCP
3 - None
Choose from 1, 2, 3 (1, 2, 3) [1]: 3
custom_bootstrap_compilation [n]: y
use_compressor [n]: y
use_celery [n]: y
use_mailhog [n]: n
use_sentry [n]: n
use_whitenoise [n]: n
use_heroku [n]: n
use_travisci [n]: n
keep_local_envs_in_vcs [y]: n
debug [n]: y
[WARNING]: You chose not to use a cloud provider, media files won't be served in production.
[SUCCESS]: Project initialized, keep up the good work!
[devops@DZBXDEV02 ~]$
原来是可以直接cookiecutter https://github.com/pydanny/cookiecutter-django.git 或者 cookiecutter git@github.com:cookiecutter/cookiecutter.git 现在在线使用总容易出问题
10 -
1cho糖糖
2019-05-14
先在本地安装git
然后通过
git clone https://github.com/pydanny/cookiecutter-django.git
将cookiecutter-django这个包克隆到本地。
然后在同级目录下通过下面的命令来运行对应包的模板就可以正常创建cookiecutter-django的项目了
cookiecutter cookiecutter-django/
112019-05-14 -
根红苗正小红花
2019-05-03
解决了没老哥!学习为何如此艰难0.0
112019-05-03 -
Jack
2019-05-13
因为cookiecutter-django这个仓库不给git clone权限了,很奇怪只有部分地区可以。
改用 cookiecutter https://github.com/pydanny/cookiecutter-django.git 吧
先把cookiecutter安装在python3的环境,然后软链接一下
$ yum install git # 现在系统上安装git
$ pip3 install --ignore-installed requests # 更新requests包
$ pip3 install cookiecutter
$ ln -s /usr/local/python3/bin/cookiecutter /usr/bin/cookiecutter
# 创建软链接,/usr/local/python3/是Python3的安装路径
00 -
Jack
2019-04-30
更新一下requests和urllib3包试试 pip3 install requests urllib3 --upgrade
再不行改用https试下 cookiecutter https://github.com/pydanny/cookiecutter-django.git
082019-07-04
相似问题