cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
3141
Views
10
Helpful
3
Replies
armstrong4u2
Beginner

No module named pip

Hello Team,

 

I am working Learning Labs for DevNet. ("Setting up your macOS workstation as a development environment"), and I need some help with setting up the Python2.7 virtualenv.

 

Setting up my Development Environment on macbook pro running macOS Mojave.

I have followed the steps but receiving some form of error message for this step "Install the virtualenv package for Python within Python 2."

 

Terminal Command:

  python2.7 -m pip install virtualenv

 

output message:

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: No module named pip

 

Kindly assist. 

Thanks.

 

3 REPLIES 3

Try with

sudo easy_install pip

You need to enter your Mac OS X user's password.

Once pip is installed, try again

sudo python2.7 -m pip install virtualenv
LanDownUnda
Beginner

Hi armstrong4u2,

 

Python if your not aware is extremely modular in the sense where when you first install python you'll have some modules automatically installed like "requests" for example. Package managers like PIP and other modules won't be installed by default so you'll need to install pip manually in order to then install packages using pip (catch my drift?).

 

An easy way of doing this is to do the following:

 

1. Download pip using the following command:

 

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

 

2. Install pip using the following command:

 

python get-pip.py

 

I hope this helps!

*** Rate All Helpful Responses ***
lovelmark
Beginner

Pip is a python packaging module that helps us too install python libraries. To install python libraries/modules ,you need to install pip-

 

sudo apt-get install python-setuptools
sudo easy_install pip
sudo apt-get update
which pip //to check pip install or not
pip install requests

 

Upgrade pip

python -m pip install --upgrade pip

for Python 3:

python3 -m pip install --upgrade pip

for Python 2:

python2 -m pip install --upgrade pip

Create
Recognize Your Peers
Content for Community-Ad