0

I'm on OSX, and I installed IDLE for Python 3.4. However, in Terminal my python -V and pip --version are both Python 2.7.

How do I fix this? I really have no idea how any of this works, so please bear with my lack of knowledge.

Unheilig
  • 15,690
  • 193
  • 65
  • 96
Elle Nolan
  • 341
  • 2
  • 7
  • 22

3 Answers3

0

Try python3 or python3.4. It should print out the right version if correctly installed.

Python 3.4 already has pip with it. You can use python3 -m pip to access pip. Or python3 -m ensurepip to make sure that it's correctly installed.

skyline75489
  • 14,089
  • 7
  • 43
  • 59
  • Okay, it does that. Now how do I update pip so that it installs things for Python 3 rather than Python 2? You didn't really answer my question... – Elle Nolan Apr 12 '15 at 01:17
  • @DrewNolan: Python 3.4 includes `pip`; you can use `python3.4 -m pip ...` to access the bundled version. – Martijn Pieters Apr 12 '15 at 01:29
0

When you install Python3, you can use python3 to run python programs(or use a shebang). Python 3 also install pip. If you find your Python3 installed version of pip try to alias the pip command to the newer pip. Check this out for more info:

How to install pip for Python 3 on Mac OS X?

Community
  • 1
  • 1
an earwig
  • 5,690
  • 12
  • 59
  • 101
0

I have found that making the 'python' alias replace the default version of python that the system comes with is a bad idea.

When you install a new version of python (3.4 for instance), these two new commands are installed, specifically for the version you installed:

pip3.4

python3.4

If you're using an IDE that wants you to indicate which python version you are using the IDE will let you navigate to it in the Library folder

pip will still be for python2.7 after you download some other python version, as I think that's the current version osx comes installed with

brw59
  • 492
  • 4
  • 18