0
sudo easy_install pyzmq
Searching for pyzmq
Best match: pyzmq 13.0.2
Processing pyzmq-13.0.2-py2.6-macosx-10.8-intel.egg
pyzmq 13.0.2 is already the active version in easy-install.pth

Using /Library/Python/2.6/site-packages/pyzmq-13.0.2-py2.6-macosx-10.8-intel.egg
Processing dependencies for pyzmq
Finished processing dependencies for pyzmq

今、私はこのようにzeromqで私のpythonプログラムを実行しなければなりません

python2.6 program.py

私のデフォルトのpythonはpython 2.7です。Python 2.7でpyzmqモジュールをインストールするには?

4

1 に答える 1

0

おそらくeasy_install、パス上の が Python 2.6 用であるためです。

の出力を確認してください

which easy_install
head -n 1 $(which easy_install)

そして、あなたはおそらくあなたの答えを持っているでしょう。Python 2.7 の setuptools / distributed をインストールまたは再インストールするか、Python 2.7 の easy_install が PATH 上の 2.6 よりも先にあることを確認する必要がある場合があります。あなたが試すことができます

which -a easy_install

複数の easy_installs が PATH のどこにあるかを確認します。

于 2013-04-24T04:21:12.177 に答える