Error running networkx tests

142 views
Skip to first unread message

Munasur12

unread,
Apr 4, 2018, 1:25:49 PM4/4/18
to networkx-discuss

Hi,
I installed networkx using sudo pip install networkx[all] onto an Ubuntu 17.10 system. However, when I run the test:

>>> import networkx as nx
>>> nx.test()

the following error occurs:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "networkx/tests/test.py", line 24, in run
    "The nose package is needed to run the NetworkX tests.")
ImportError: The nose package is needed to run the NetworkX tests.
>>> 

Any help is much appreciated.

Henri Girard

unread,
Apr 4, 2018, 2:08:11 PM4/4/18
to networkx...@googlegroups.com

As I use it with sage i pip it with sage

./sage -pip install networkx --upgrade

My sage directory is is in my home I don't need sudo and python 2 ca be used too

--
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 https://groups.google.com/group/networkx-discuss.
For more options, visit https://groups.google.com/d/optout.

Henri Girard

unread,
Apr 4, 2018, 2:10:09 PM4/4/18
to networkx...@googlegroups.com

I forget to say restart sage kernel in sage -n=jupyter

There are few dependencies to install too... Look the networkx tutorial for installation it's well done.


Le 04/04/2018 à 19:23, Munasur12 a écrit :

Munasur12

unread,
Apr 4, 2018, 2:10:51 PM4/4/18
to networkx-discuss
Thanks @Henri for the reply. Can you give be more information about sage? I have not heard about it.

Henri Girard

unread,
Apr 4, 2018, 2:19:32 PM4/4/18
to networkx...@googlegroups.com

Sorry I didn't notice it wasn't sagemath mailing list, because I just install networkx  few days ago and I asked some help from them

https://groups.google.com/forum/#!forum/sage-support

http://www.sagemath.org/tour.html

Sage has already a good graphs tools, many free books are written for it  (sagebook in french which is actually translated in english and is free) sage for graduate mister bard (lol) very good man and very good book, sagemath is a very quick developing software with many tools, python, numpy sympy etc...

Hope this help

Henri

Henri Girard

unread,
Apr 4, 2018, 2:26:45 PM4/4/18
to networkx...@googlegroups.com

Here is the installation from the tutoriel (install the import with sudo apt install "file" and if you can't find it install it from pip or python in sage :

./sage -pip install "file"

./sage -python setup.py install if you have one (for example from a git)


Le 04/04/2018 à 19:23, Munasur12 a écrit :
2-4-networkx.ipynb
Reply all
Reply to author
Forward
0 new messages