【问题标题】:Multiple Python Installations - both easy_install and pip fail多个 Python 安装 - easy_install 和 pip 都失败
【发布时间】:2014-01-04 13:02:25
【问题描述】:

我有 Python 3.3.3 的系统级安装,我想在 /usr/local/python33 的用户空间中进行安装,作为多版本 virtualenv 类型设置的一部分。我创建了目录,并尝试使用 easy_install 和 pip(作为系统级安装中的 easy_install-3.3 和 pip-3.3)将 Python 3.3.3 的副本放在那里。没有喜悦。两次尝试的日志如下所示。我认为这应该是直截了当的,但我的信心,如果标记。

简易安装

easy_install-3.3 --install-dir="/usr/local/python33" python==3.3.3
Creating /usr/local/python33/site.py
Searching for python==3.3.3
Reading https://pypi.python.org/simple/python/
Reading http://www.python.org
Reading http://www.python.org/2.3
Reading http://www.python.org/2.4
Reading http://www.python.org/2.4.1
Reading http://www.python.org/2.5
Reading http://www.python.org/download/
Best match: Python 3.3.3
Downloading http://www.python.org/ftp/python/3.3.3/Python-3.3.3.tgz
Processing Python-3.3.3.tgz
Writing /var/folders/l0/14nc8kh968l6kqp86s5ddxph0000gn/T/easy_install-3cjpwy/Python-3.3.3/setup.cfg
Running Python-3.3.3/setup.py -q bdist_egg --dist-dir /var/folders/l0/14nc8kh968l6kqp86s5ddxph0000gn/T/easy_install-3cjpwy/Python-3.3.3/egg-dist-tmp-3me0es
error: Setup script exited with error: Modules/Setup: No such file or directory

画中画

pip-3.3 install --target /usr/local/python33 python==3.3.3

您正在安装一个可能不安全且无法验证的文件。未来版本的 pip 将默认禁止不安全文件。

  Downloading from URL http://www.python.org/ftp/python/3.3.3/Python-3.3.3.tgz (from http://www.python.org/download/)
  Running setup.py egg_info for package python

    running egg_info
    creating pip-egg-info/Python.egg-info
    writing dependency_links to pip-egg-info/Python.egg-info/dependency_links.txt
    writing top-level names to pip-egg-info/Python.egg-info/top_level.txt
    writing pip-egg-info/Python.egg-info/PKG-INFO
    writing manifest file 'pip-egg-info/Python.egg-info/SOURCES.txt'
    warning: manifest_maker: standard file '-c' not found


    reading manifest file 'pip-egg-info/Python.egg-info/SOURCES.txt'
    writing manifest file 'pip-egg-info/Python.egg-info/SOURCES.txt'
  Source in /private/var/folders/l0/14nc8kh968l6kqp86s5ddxph0000gn/T/pip_build_tipton/python has version 3.3.3, which satisfies requirement python==3.3.3
Installing collected packages: python

  Running setup.py install for python

    Running command /Library/Frameworks/Python.framework/Versions/3.3/bin/python3.3 -c "import setuptools;__file__='/private/var/folders/l0/14nc8kh968l6kqp86s5ddxph0000gn/T/pip_build_tipton/python/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/l0/14nc8kh968l6kqp86s5ddxph0000gn/T/pip-x_pk9r-record/install-record.txt --single-version-externally-managed --home=/var/folders/l0/14nc8kh968l6kqp86s5ddxph0000gn/T/tmpf4gi0e
    usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]

       or: -c --help [cmd1 cmd2 ...]

       or: -c --help-commands

       or: -c cmd --help



    error: option --single-version-externally-managed not recognized

【问题讨论】:

  • 你实际使用的命令是什么?
  • 实际命令显示在问题中:easy_install-3.3 --install-dir="/usr/local/python33" python==3.3.3 and pip-3.3 install --target /usr /local/python33 python==3.3.3.

标签: python python-2.7 python-3.x pip easy-install


【解决方案1】:

easy_installpip 都用于安装 Python 包,而不是用于安装 Python 本身。

如何安装 Python 取决于您的操作系统。对于 Unices,您通常运行标准 configure; make; make install

【讨论】:

  • 我很确定可以使用 pip 安装 python,但肯定 virtualenv 是一个更好的选择
  • @LoïcFaure-Lacroix 安装 python 的标准方法是 configure;make;make install,这显然不是 pip 会做的。
  • 我对 virtualenv 的理解是,它为每个版本利用了单独的基础安装。我正在尝试设置基本安装。
  • @user96 然后下载你要安装的python版本并安装。 :-)
  • @Lennart Regebro 点。我花了太多时间尝试安装二进制文件。森林、树木等
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-08-21
  • 1970-01-01
  • 2014-12-04
  • 1970-01-01
  • 2014-09-07
  • 2018-10-23
相关资源
最近更新 更多