Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing nose using pip, but bash doesn't recognize command on mac

I'm trying to install nose on my computer for the Learn Python the Hard Way tutorial, but can't seem to get it to work. I'm using pip to install:

$ pip install nose 

And I get back:

Requirement already satisfied (use --upgrade to upgrade): nose in /usr/local/lib/python2.7/site-packages Cleaning up... 

However, when I run the command nosetests, I get:

-bash: nosetests: command not found 

I'm thinking there's something wrong with my PATH, but honestly I have no idea. Any help would be greatly appreciated!

like image 317
Zubin Avatar asked Sep 14 '13 00:09

Zubin


People also ask

Why does pip command not work Mac?

Sometimes when you are installing packages, you might face the error: pip: command not found . This error could be due to the following reasons: Pip is not installed. Pip is installed, but it is not compatible with the current environment.

Why is my pip command not working?

Reinstall Python to Fix 'Pip' is Not Recognized as an Internal or External Command. This error usually means there's a problem with the Python installation or the system variable PATH is not set up correctly. Try reinstalling Python and all its components to fix the problem.

How do I get-pip to work on my Mac?

To use the get-pip script to install PIP on Mac:Open the Terminal app via the Launchpad. In the Terminal, type curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py and press Enter. Allow curl time to download the script onto your Mac. Once it's done, type python3 get-pip.py and press Enter.


2 Answers

I got this problem until I setup nose with sudo:

sudo pip install nose 
like image 133
Maxim Yefremov Avatar answered Sep 28 '22 05:09

Maxim Yefremov


i had the same problem but this solved it.

  1. Install: nose2
  2. Then use: nose2 instead of nosetests to test program

Good Luck...!

like image 25
Jimmy_Rw Avatar answered Sep 28 '22 03:09

Jimmy_Rw