7

OS: Mac OS X 10.11.3

I have Python 2.7.10 and Python 3.4.3.

When I pip install some_package pip installs package for Python 2.7.10, but I want to install package for Python 3.4.3.

How I can set default Python or install package for 3.4.3?

1

2 Answers 2

7

Much like the python/python3 executables, pip also has two variants. You can use pip3 to install Python 3 packages.

Sign up to request clarification or add additional context in comments.

Comments

1

You can install pip package using virtual environment:

virtualenv -p /usr/bin/python3 py3env
source py3env/bin/activate
pip install package-name

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.