我pydot2
使用 Ipython notebook 成功安装。
%%bash
pip install pydot2
Collecting pydot2
Downloading pydot2-1.0.33.tar.gz
Requirement already satisfied (use --upgrade to upgrade): pyparsing in /Users/ram/anaconda/lib/python3.5/site-packages (from pydot2)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /Users/ram/anaconda/lib/python3.5/site-packages/setuptools-19.1.1-py3.5.egg (from pydot2)
Building wheels for collected packages: pydot2
Running setup.py bdist_wheel for pydot2
Stored in directory: /Users/ram/Library/Caches/pip/wheels/e5/2d/ca/55e0109fb619edaa42ca287d9e55519eeebebc9bbca35996f6
Successfully built pydot2
Installing collected packages: pydot2
Successfully installed pydot2-1.0.33
在终端,我看到 pydot2 存在。在 python 中, import pydot2
失败并import pydot
显示 pydot 的 1.0.29 版本,而不是 1.0.33。
$ pip freeze| grep pydot
pydot2==1.0.33
$ python
Python 3.5.1 |Anaconda 2.4.0 (x86_64)| (default, Dec 7 2015, 11:24:55)
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import pydot
pydot.__version__
'1.0.29'
import pydot2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'pydot2'
问题:在安装pydot2之前是否需要卸载pydot。我怎么做 ?
注意:我有一个双 Ananconda python env (2.7/3.5) 在 2.7 中,没有安装 pydot。我使用的是最新的 MacOS 10.11。
我无法确定 pydot 1.0.29 在我的系统上的位置。