我正在尝试使用powershell创建virtualenv,但是出现以下错误,但我没有找到解决方案:
Collecting virtualenvwrapper-powershell
Using cached https://files.pythonhosted.org/packages/f5/40/36d418b950139cd09738c0924066ef340ffd6c43f79f67c6152c56a8a628/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\spajd\AppData\Local\Temp\pip-install-q84xhg3w\virtualenvwrapper-powershell\setup.py", line 76
TOKEN_READ = 0x00020000L | 0x0008
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1
如果有人可以帮助我,我将不胜感激!
最佳答案
语法0x00020000L
仅限于Python2:
$ python
Python 2.7.13 (default, Nov 24 2017, 17:33:09)
>>> 0x00020000L
131072L
$ python3
Python 3.5.3 (default, Jan 19 2017, 14:11:04)
>>> 0x00020000L
File "<stdin>", line 1
0x00020000L
^
SyntaxError: invalid syntax
该代码显然不适用于Python3。