在安装Python的情况下使用pypy的easy_install

8 投票
3 回答
7799 浏览
提问于 2025-04-17 09:08

我在系统上安装了PyPy,同时还保留了Python 2.7。

  • 我该如何安装并使用easy_install与PyPy一起?
  • easy_install安装时,怎么指定安装位置?
  • 为了方便使用,我需要设置什么环境变量吗?

我在使用Windows,不过这些问题对所有平台来说似乎都很相关……

3 个回答

2

至少这个对我有效:

$ 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.
5

另一种解决办法是安装pip。可以按照pip的说明文档中的步骤来操作:

wget https://bootstrap.pypa.io/get-pip.py
pypy get-pip.py
pypy -m pip install ipython
5

你需要手动为pypy安装easy_install。

具体的步骤可以在这个问题的回答中找到: 在PyPy下安装Python包

撰写回答