【发布时间】:2017-02-01 16:34:48
【问题描述】:
目前我正在关注这个guide 来设置python,目的是制作一个python 刮板。我正在尝试安装 Vitualenvwrapper,它应该是一个简单的 pip 命令,但我不断收到语法错误。我已经尝试了列出的修复程序(即使我发现的修复程序没有将语法错误列为问题)。谁能帮我解释一下?
$ C:\Users\nik> pip install virtualenvwrapper-powershell
Collecting virtualenvwrapper-powershell
Using cached virtualenvwrapper-powershell-12.7.8.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\nik\AppData\Local\Temp\pip-build-c37hzy_b\virtualenvwrapper-powershell\setup.py", line 76
TOKEN_READ = 0x00020000L | 0x0008
^
SyntaxError: invalid syntax
Command "python setup.py egg_info" failed with error code 1 in C:\Users\nik\AppData\Local\Temp\pip-build-c37hzy_b\virtualenvwrapper-powershell\
【问题讨论】:
-
看起来您正试图在 Python 3.x 中运行 Python 2.x 代码。 (语法
0x00020000L用于生成长整数,现在它是一个错误)。我看到你链接的指南说“你需要 Python 2.x” -
我有两个版本的python所以可能是它,我会尝试卸载一个并回复你
标签: python powershell syntax