2

According to this documentation, Python3.4, which I am using, ships with pipX or pipX.Y. When I type pip3 or pip3.4 into my terminal, I get a "command not found".

I am also using Python2.7 and have pip installed for that. When I type pip --version I get:

pip 6.0.7 from /Library/Python/2.7/site-packages (python 2.7)

Why doesn't pip3 or pip3.4 work?

falsetru
  • 357,413
  • 63
  • 732
  • 636
jds
  • 7,910
  • 11
  • 63
  • 101

2 Answers2

2

How to use pip with Python 3.x alongside Python 2.x

curl -O https://raw.githubusercontent.com/pypa/pip/master/contrib/get-pip.py

1567K download

sudo python3 get-pip.py  

Collecting pip
   Downloading pip-6.0.7-py2.py3-none-any.whl (1.3MB)
    100% |################################| 1.3MB 336kB/s 
Installing collected packages: pip

Successfully installed pip-6.0.7

me@fissionchips:~$ pip3 -V

pip 6.0.7 from /usr/local/lib/python3.4/dist-packages (python 3.4)

Community
  • 1
  • 1
Nodak
  • 929
  • 1
  • 8
  • 14
  • I tried this and received a zipimport error. I'm not sure why, but it looks like my build of Python was atypical. I just reinstalled Python 3.4, and now `pip3` works. – jds Feb 09 '15 at 16:12
1

After trying both answers provided, I kept running into odd Python issues. For example, I received a zipimport.ZipImportError: can't decompress data; zlib not available error when running sudo python3 get-pip.py and Ignoring ensurepip failure: pip 1.5.6 requires SSL/TLS error when running python3.4 -m ensurepip. It looked like I was missing many of the dependencies that come with a typical Python bui

I uninstalled Python 3.4 using this SO answer, reinstalled Python 3.4, and now the pip3 command works.

Community
  • 1
  • 1
jds
  • 7,910
  • 11
  • 63
  • 101