我正在尝试在Mac上从我自己的github本地运行现有的Django 1.9项目。
https://github.com/shanegibney/djangoForum.git
自从一年前发布到github以来,我已经从linux,Fedora转移到了mac。
我一直在遵循指示,
How to run cloned Django project?
$ mkdir djangoForum
$ cd djangoForum
$ virtualenv
$ git clone https://github.com/shanegibney/djangoForum.git
$ source env / bin / activate
$ cd djangoForum
$ pip install -r requirements.txt
这是我收到以下错误的地方,
(env) shanegibney at Shanes-MacBook-Pro in ~/djangoForum/djangoForum on master*
$ pip3 install -r requirements.txt
Collecting arrow==0.7.0 (from -r requirements.txt (line 1))
Using cached arrow-0.7.0.tar.gz
Collecting beautifulsoup4==4.4.1 (from -r requirements.txt (line 2))
Using cached beautifulsoup4-4.4.1-py3-none-any.whl
Collecting disqus==0.0.4 (from -r requirements.txt (line 3))
Using cached disqus-0.0.4.tar.gz
Collecting Django==1.10.2 (from -r requirements.txt (line 4))
Using cached Django-1.10.2-py2.py3-none-any.whl
Collecting django-allauth==0.25.2 (from -r requirements.txt (line 5))
Using cached django-allauth-0.25.2.tar.gz
Collecting django-allauth-bootstrap==0.1 (from -r requirements.txt (line 6))
Using cached django-allauth-bootstrap-0.1.tar.gz
Collecting django-emoticons==1.1.2 (from -r requirements.txt (line 7))
Using cached django_emoticons-1.1.2-py2.py3-none-any.whl
Collecting django-forms-bootstrap==3.0.1 (from -r requirements.txt (line 8))
Using cached django-forms-bootstrap-3.0.1.tar.gz
Collecting django-tinymce==2.3.0 (from -r requirements.txt (line 9))
Using cached django-tinymce-2.3.0.tar.gz
Collecting evernote==1.25.1 (from -r requirements.txt (line 10))
Using cached evernote-1.25.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/8z/jqnd9kp531q6h12pj95z0kwc0000gn/T/pip-build-_kcvo5hn/evernote/setup.py", line 6
exec x
^
SyntaxError: Missing parentheses in call to 'exec'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/8z/jqnd9kp531q6h12pj95z0kwc0000gn/T/pip-build-_kcvo5hn/evernote/
无论是使用pip还是pip3,错误都是一样的。
$ pip --version 来自/Users/shanegibney/djangoForum/env/lib/python3.6/site-packages(python 3.6)的pip 9.0.1
$ python --version
Python 3.6.3
$ python
/用户/ shanegibney / djangoForum / env的/ bin中/蟒
$ python2
什么都不返回
requirements.txt文件在这里,
https://github.com/shanegibney/djangoForum/blob/master/requirements.txt
任何人都可以在尝试安装requirements.txt时看到我收到错误的原因吗?
尝试将我的virtualenv更改为Python2,
$ virtualenv -p python2 v
路径python2(来自--python = python2)不存在
答案 0 :(得分:0)
Evernote SDK for Python仅支持Python 2.由于您在Python 3中的虚拟环境,您会收到错误。当您激活virtualenv时,pip
也会安装到Python 3 virtualenv中。
README有一个指向experimental repository for Python 3的链接。您可以尝试安装它,但您可能会在项目中发现其他不兼容性。您的另一个选择是在Python 2中运行您的项目。
如果您决定使用Python 2,那么请确保在创建virtualenv时使用Python 2,例如
virtualenv -p python2 v
然后在安装您的要求之前激活您的virtualenv。
答案 1 :(得分:0)
仔细检查Python2是否在此项目中使用。 如果是这样,请使用注释
安装依赖项 pip install -r requirements.txt
如果使用Python3 +。 使用评论
使用Python3创建Virtualenvvirtualenv -p python3 env
并按
安装依赖项 pip3 install -r requirements.txt