Running .py files problems: Networkx is missing

2,381 views
Skip to first unread message

iv'

unread,
Nov 25, 2015, 8:38:15 AM11/25/15
to networkx-discuss
Hi everyone,

I am working with BooleanNet1.2.7 in Ubuntu and I am trying to run some files, one of which is  "all-initial-states.py".  but I am facing problems. I have Python2.7 and I have installed all the other packages needed for such scripts. The problem is that when I run this file it shows an error message " networkx is missing".

I have installed networkx with <pip install networkx>. Then, when I write in terminal: "pip show networkx" it shows this message:
---
Metadata-Version: 1.1
Name: networkx
Version: 1.10
Summary: Python package for creating and manipulating graphs and networks
Home-page: http://networkx.github.io/
Author: NetworkX Developers
Author-email: networkx-discuss@googlegroups.com
License: BSD
Location: /usr/local/lib/python2.7/dist-packages/networkx-1.10-py2.7.egg
Requires: decorator 

--
Is this a networkx installation problem? I don't understand what does it mean "Requires: decorator". Does this mean that I should install other packages? I'll appreciate any help to resolve this problem.

Thank you very much in advance!
Iv'

Daniel Schult

unread,
Nov 25, 2015, 8:50:57 AM11/25/15
to networkx...@googlegroups.com
The usual error message when networkx is not installed is: ```ImportError: No Module Named networkx```

From the command line try:  ```python -c "import networkx"``` If this works then networkx is being imported without error.

On Wed, Nov 25, 2015 at 4:52 AM, iv' <inva...@gmail.com> wrote:
Hi everyone,

I am working with BooleanNet1.2.7 in Ubuntu and I am trying to run some files, one of which is  "all-initial-states.py".  but I am facing problems. I have Python2.7 and I have installed all the other packages needed for such scripts. The problem is that when I run this file it shows an error message " networkx is missing".

I have installed networkx with <pip install networkx>. Then, when I write in terminal: "pip show networkx" it shows this message:
---
Metadata-Version: 1.1
Name: networkx
Version: 1.10
Summary: Python package for creating and manipulating graphs and networks
Home-page: http://networkx.github.io/
Author: NetworkX Developers

License: BSD
Location: /usr/local/lib/python2.7/dist-packages/networkx-1.10-py2.7.egg
Requires: decorator 

--
Is this a networkx installation problem? I don't understand what does it mean "Requires: decorator". Does this mean that I should install other packages? I'll appreciate any help to resolve this problem.

Thank you very much in advance!
Iv'

--
You received this message because you are subscribed to the Google Groups "networkx-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to networkx-discu...@googlegroups.com.
To post to this group, send email to networkx...@googlegroups.com.
Visit this group at http://groups.google.com/group/networkx-discuss.
For more options, visit https://groups.google.com/d/optout.

iv'

unread,
Nov 26, 2015, 7:16:35 PM11/26/15
to networkx-discuss
It works because I have done it before, but when I run the file it gives again the same problem.

Aric Hagberg

unread,
Nov 26, 2015, 7:22:15 PM11/26/15
to networkx...@googlegroups.com
Could you post the output of
python -c "import networkx; print networkx.__file__"?
That might help us figure out where the problem is.

Aric



On Thu, Nov 26, 2015 at 5:13 PM, iv' <inva...@gmail.com> wrote:
> It works because I have done it before, but when I run the file it gives
> again the same problem.
>

iv'

unread,
Nov 30, 2015, 5:22:50 PM11/30/15
to networkx-discuss
It gives me this message:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: 'module' object has no attribute '_all_initial_states'


Daπid

unread,
Nov 30, 2015, 5:27:13 PM11/30/15
to networkx...@googlegroups.com

That looks like a broken installation. How have you installed networkx?  Can you reinstall it?

iv'

unread,
Nov 30, 2015, 5:42:25 PM11/30/15
to networkx-discuss
I have installed networkx using
pip install networkx
I have tried to follow all the instructions that I found on this page http://networkx.github.io/documentation/latest/install.html

However, when I try from the command line python -c "import networkx" it doesn't give anything. Doesn't this mean that networkx is correctly installed? :/
Reply all
Reply to author
Forward
0 new messages