2011-12-28 72 views
8

我安裝了PyPy,但仍在我的系統上安裝了Python 2.7。安裝Python時使用pypy easy_install

  • 我該如何安裝,然後用easy_install與PyPy?
  • 區分我要安裝的位置的語法是什麼?easy_install
  • 我應該爲易用性設置任何環境變量嗎?

我在Windows,但這些問題對於所有平臺似乎有關...

回答

5

您需要手動安裝的easy_install的pypy。

它在回答這個問題解釋說: Installing Python eggs under PyPy

+0

如果你有python的可執行文件在你的路徑,使用'pypy [無論]'語法對所有安裝,使其安裝在pypy而不是蟒蛇 – Jonathan 2011-12-28 15:23:31

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. 
+0

這可以工作,但我的避風港沒有看到使用'easy_install'的建議,這是幾年前沒有寫的。過去≈2年,'setuptools'一直是統一的標準。 (之前是'setuptools'和'distribute'之間的競爭;他們最終合併到了當前的'setuptools'中。)我對pypy不太熟悉(以及它是否需要Pythons 2&3所不需要的東西),但它是值得仔細檢查一下,以防萬一。 – Zearin 2015-05-04 12:29:20

5

另一種解決方案是安裝點子。繼pip's documentation說明:

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

通常需要使用'sudo'前綴。 – EOL 2015-05-12 05:53:12

+0

@EOL:不推薦以root身份運行pip。用'--user'或virtualenv運行是一個不太可怕的想法。 – geoffspear 2016-01-20 15:53:05

+0

這是真的,除非你想爲所有用戶安裝Python包,對吧?或者是否有正式的更好的方法(儘可能使用通用包管理器)? – EOL 2016-01-20 20:34:34