需要幫助來確認我的NetworkX安裝併成功將NetworkX導入到Python IDLE中。已安裝NetworkX,但無法將其導入到Python IDLE
我有Mac OS X 10.7.5,我安裝了Python 3.3應用程序。我以前曾經成功使用過Python 3.3。
我安裝網絡X通過執行以下步驟:
1. downloaded networkx-1.8.1.tar.gz into my Downloads folder
2. double clicked on the the tar.gz file, and the contents were extracted
in a subfolder called networkx-1.8.1
3. went into Mac Terminal and changed my directory to the Downloads/networkx-1.8.1 folder
4. I entered the following Terminal command to install Networkx:
sudo python ./setup.py install
This installation appears to be successful.
5. I opened IDLE and typed: import networkx as nx, and I received the following error
message:
ERROR MESSAGE:
>>> import networkx as nx
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
import networkx as nx
ImportError: No module named 'networkx'
>>>
我的問題是:1。 你知道,如果NetworkX與Python 3.3兼容? 2.您知道如何將NetworkX導入IDLE以便我可以使用它嗎?
很多非常感謝您提供的任何幫助。 :-)
NetworkX與Python3.3協同工作:https://travis-ci.org/networkx/networkx – Aric
您是否使用IDLE用於安裝NetworkX的相同版本的Python? – Aric
我不確定如何檢查我的Python 3.3版本是否適用於NetworkX 1.8.1。我認爲基於上面列出的步驟成功安裝了NetworkX 1.8.1,因爲我在Mac Terminal中沒有收到任何錯誤消息。但是,當我進入IDLE時,Python在嘗試導入它時似乎並不知道在這裏找到NetworkX。我想知道是否需要告訴Python IDLE找到NetworkX的目錄。 – user3216957