06-12-2019 03:11 PM
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.
06-12-2019 06:49 PM - edited 06-12-2019 06:50 PM
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
06-19-2020 10:29 PM
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!
07-20-2021 10:57 PM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide