[英]Can't install PyZMP for Python — Dependencies
我在為iPython安裝PyZMP依賴時遇到問題。 我嘗試了很多東西,比如使用pip / brew,但最后用這個答案手動安裝了包。
現在, pip list packages
產生以下結果
pyzmq (14.2.0-dev)
pyzmq-static (2.2)
(我也嘗試過使用pyzmq-static)。
此外,我的蟒蛇蛋明顯存在於正確的位置:
ls /usr/local/lib/python2.7/site-packages/ | grep "pyzmq"
pyzmq-14.2.0_dev-py2.7.egg-info
pyzmq_static-2.2-py2.7.egg-info
此外:
which python
/usr/local/bin/python
echo $PYTHONPATH
/usr/local/lib/python:
但是,當我嘗試導入時
Python 2.7.6 (default, Mar 20 2014, 17:55:13)
In [1]: import pyzmq
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-2faa556e5dc0> in <module>()
----> 1 import pyzmq
ImportError: No module named pyzmq
任何幫助故障排除都會有很多幫助!
更新:我能夠在python中列出zmq模塊,但不能列出pyzmq模塊:
>>help('modules zmq')
Here is a list of matching modules. Enter any module name to get more help.
buildutils - utilities for building pyzmq.
buildutils.constants - script for generating files that involve repetitive
updates for zmq constants.
buildutils.detect - Detect zmq version
zmq - Python bindings for 0MQ.
...
zmqversion - A simply script to scrape zmq.h for the zeromq version.
IPython.consoleapp - A minimal application base mixin for all ZMQ based
IPython frontends.
IPython.html.base.zmqhandlers - Tornado handlers for WebSocket <-> ZMQ sockets.
...
IPython.utils.zmqrelated - Utilities for checking zmq versions.
我也很難安裝IPython(Jupyter),尤其是pyzmq依賴。 最后,我找到了一個對我有用的方法(在Ubuntu中),麻煩少得多:
$ sudo apt-get install libtool pkg-config build-essential autoconf automake python-dev
$ sudo apt-get build-dep matplotlib
$ sudo pip install matplotlib
$ sudo pip install "ipython[all]"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.