python - pip安装virtualenvwrapper-powershell不起作用

标签 python powershell pip virtualenv

我正在尝试使用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。

关于python - pip安装virtualenvwrapper-powershell不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50427087/

相关文章:

python - 防止将脚本目录添加到 Python 3 中的 sys.path

windows - 仅在指定的情况下才要求信用

python - 为 python 3.5.2 安装 MySql

python - 如何知道我在 conda(和 pip)中安装了哪些软件包?

python - 是否有启发式或元启发式或优化技术的 "Hello World"示例类型基础教程

python - 位置数字总和(两个数字根据其位置的数字之和)

javascript - 加载js文件时出现404错误

excel - .Trim() 函数在 foreach 循环中使用时不起作用

function - 为什么我在 PowerShell 中看不到脚本的参数?

python - 每次我尝试安装时 pyaudio 都会出现错误