当尝试使用PIP安装任何具有特定版本的依赖项时,我收到以下错误:
(myvenv) D:\Project\on-staging>pip install Fabric==1.4.3
Collecting Fabric==1.4.3
Using cached Fabric-1.4.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Admin\AppData\Local\Temp\pip-build-39la41_8\Fabric\setup.py", line 7, in <module>
from fabric.version import get_version
File "C:\Users\Admin\AppData\Local\Temp\pip-build-39la41_8\Fabric\fabric\version.py", line 104
print get_version('all')
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Admin\AppData\Local\Temp\pip-build-39la41_8\Fabric\
执行pip install Fabric
可以正常工作。
答案 0 :(得分:0)
在虚拟环境中使用python 2.7