【发布时间】:2015-02-02 09:16:41
【问题描述】:
我在 Python 2.7 中使用了 easy install,现在尝试更新到 Python 3.4,但 pip 不是很清楚。
我的操作系统是Windows 7 - 64Bits,我没有管理员权限。目前我进入终端:
C:\Users\bc50414\Documents>pip install Pyside
Fatal error in launcher: Unable to create process using '""C:\Program Files (x86)\Python34\python.exe"" "C:\PF86\Python34\Scripts\pip.exe" install Pyside'
其中 pip 只是 doskey pip=C:\PF86\Python34\Scripts\pip.exe $* 的别名。显然空格有问题,所以使用这个解决方案(python3=C:\PF86\Python34\python.exe $*):
C:\Users\bc50414\Documents>python3 -m pip install Pyside
Downloading/unpacking Pyside
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement Pyside
Cleaning up...
No distributions at all found for Pyside
Storing debug log for failure in C:\Users\bc50414\pip\pip.log
仍然失败...日志是:
C:\PF86\Python34\lib\site-packages\pip\__main__.py run on 02/02/15 09:14:35
Downloading/unpacking Pyside
Getting page https://pypi.python.org/simple/Pyside/
Could not fetch URL https://pypi.python.org/simple/Pyside/: timed out
Will skip URL https://pypi.python.org/simple/Pyside/ when looking for download links for Pyside
Getting page https://pypi.python.org/simple/
我猜这是防火墙/代理的问题,因为我在一家公司使用这个......所以我尝试了这个:
C:\Users\bc50414\Documents>python3 -m pip install --proxy="XXXXXmyproxyXXXXX" Pyside
Downloading/unpacking Pyside
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement Pyside
Cleaning up...
No distributions at all found for Pyside
Storing debug log for failure in C:\Users\bc50414\pip\pip.log
我真的不知道如何解决这个问题,并且害怕我被 Python 中的大量代码困住了,而我 无法 接触到的 pacakge ...
【问题讨论】:
-
PySide写成大写的 P 和大写的 S;不是Pyside(您的第二个错误表明名称有问题:“Pyside 根本找不到分布”)。 -
无论有没有大写,我都有同样的问题...... :(
-
docs.python.org/3/library/ensurepip.html#module-ensurepip 应该是您所需要的。如果您的发行版默认禁用 pip(例如 ubuntu,如果我没记错的话),您需要安装该附加软件包,坦率地说,您是靠自己的
-
另外,如果您没有管理员权限并且系统范围内安装了python,请使用
virtualenv -
Program Files 中的系统范围安装必须由具有管理员权限的其他人完成,并且需要管理员权限才能通过向 PF/python34/Lib/site-packages 添加任何内容来修改安装。要求那个人做出改变。当 Python 安装在别处时,情况就有些不同了。
标签: python-3.x pip