2016-10-11 1 views
0

Je suis en train d'exécuter un logiciel sous Ubuntu 12.04. Cela nécessite Python. J'ai python 2.7.3 sur ubuntu. Lorsque essayez d'exécuter la commande suivante ./cmdsadit sim -c ./Example/SimExample.py il montre"ImportError: aucun module nommé path" s'affiche lors de l'exécution d'un logiciel sous Ubuntu 12.04

[email protected]:~/sadit$ ./cmdsadit sim -c ./Example/SimExample.py 
[warning] socketIO_client is not found. Real-time ability is disabled 
--> Use [matplotlib] as plot backend 
--> [warning] cannot import sql related function, reading for sql server is not supported 
WARNING:util:Cannot find [socketIO_client], real-time ability is disabled. 
WARNING:util:Cannot import sql related function, reading for sql server is not supported 
Traceback (most recent call last): 
    File "fs.py", line 10, in <module> 
    from networkx.algorithms.traversal.path import single_source_dijkstra_path, dijkstra_path_length 
ImportError: No module named path 
[email protected]:~/sadit$ 

Certains capture d'écran de première ligne du fichier fy.py est donné ci-dessous

enter image description here

Comment puis-je résoudre cette erreur?

Répondre

0

L'erreur est explicite, votre importation à partir du module de chemin est incorrect Il devrait être

from networkx.algorithms import single_source_dijkstra_path, dijkstra_path_length