【问题标题】:Making pip working under python 3.4使 pip 在 python 3.4 下工作
【发布时间】: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


【解决方案1】:

PIP 应该已经包含在 Python 3.x 中 在 Windows 中打开命令提示符。 然后输入 pip

您可以通过按 Windows 按钮打开命令提示符,然后键入 cmd 搜索程序。

它也应该安装在 Windows 开始按钮的附件文件夹中。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-19
    • 2015-06-25
    • 2014-08-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多