Nosetests python will not work

I learned Python from "learning python the hard way," and I'm stuck in exercise 46 ( http://learnpythonthehardway.org/book/ex46.html ).

I installed pip and then the nose package and whenever I run nosetest now, as in the example, it does not work. This is the error I get:

Traceback (most recent call last): File "/usr/local/bin/nosetests", line 5, in <module> from pkg_resources import load_entry_point File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2807, in <module> parse_requirements(__requires__), Environment() File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 594, in resolve raise DistributionNotFound(req) pkg_resources.DistributionNotFound: nose==1.3.0 

I considered this, but could not find the answer. I'm on the Lubuntu 13.04 desktop.

+4
source share
1 answer

You need to install the nose version equal to 1.3.0 (maybe the installed nose version is not 1.3.0 ?)

You can find out which version of nose you installed using

 >>> import nose >>> nose.__version__ '1.3.0' 

Using pip is as simple as (if you already have nose installed, then you will want to use the --upgrade flag)

 pip install --upgrade nose==1.3.0 

or even directly from the website

 pip install -Iv https://pypi.python.org/packages/source/n/nose/nose-1.3.0.tar.gz#md5=95d6d32b9d6b029c3c65674bd9e7eabe 
+2
source

Source: https://habr.com/ru/post/1482138/


All Articles