我安装了PyPy,但仍在我的系统上安装了Python 2.7。安装Python时使用pypy easy_install
- 我该如何安装,然后用
easy_install
与PyPy? - 区分我要安装的位置的语法是什么?
easy_install
? - 我应该为易用性设置任何环境变量吗?
我在Windows,但这些问题对于所有平台似乎有关...
我安装了PyPy,但仍在我的系统上安装了Python 2.7。安装Python时使用pypy easy_install
easy_install
与PyPy?easy_install
?我在Windows,但这些问题对于所有平台似乎有关...
您需要手动安装的easy_install的pypy。
它在回答这个问题解释说: Installing Python eggs under PyPy
至少这为我工作:
$ brew install pypy
$ pypy -m easy_install ipython
$ /usr/local/share/pypy/ipython
Python 2.7.3 (480845e6b1dd, Jul 31 2013, 10:58:28)
Type "copyright", "credits" or "license" for more information.
IPython 1.1.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
这可以工作,但我的避风港没有看到使用'easy_install'的建议,这是几年前没有写的。过去≈2年,'setuptools'一直是统一的标准。 (之前是'setuptools'和'distribute'之间的竞争;他们最终合并到了当前的'setuptools'中。)我对pypy不太熟悉(以及它是否需要Pythons 2&3所不需要的东西),但它是值得仔细检查一下,以防万一。 – Zearin 2015-05-04 12:29:20
另一种解决方案是安装点子。继pip's documentation说明:
wget https://bootstrap.pypa.io/get-pip.py
pypy get-pip.py
pypy -m pip install ipython
通常需要使用'sudo'前缀。 – EOL 2015-05-12 05:53:12
@EOL:不推荐以root身份运行pip。用'--user'或virtualenv运行是一个不太可怕的想法。 – geoffspear 2016-01-20 15:53:05
这是真的,除非你想为所有用户安装Python包,对吧?或者是否有正式的更好的方法(尽可能使用通用包管理器)? – EOL 2016-01-20 20:34:34
如果你有python的可执行文件在你的路径,使用'pypy [无论]'语法对所有安装,使其安装在pypy而不是蟒蛇 – Jonathan 2011-12-28 15:23:31