0

I have mac os x, recently I have install python version 3.2 before I had version 2.6.1. but when I type "python" in terminal it prints Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49). what does it mean? how can I use python 3.2 that have install this week?

sandra
  • 949
  • 3
  • 12
  • 25

2 Answers2

0

I'm on windows, but I'm hoping the solution will work cross-platform.

Your computer has something called environment variables. Basically, a list of locations with names on them like python installation path. Windows computers, and probably Mac ones too, use these to intercept commands in the terminal.

Likely, python is an environment variable in your machine but it points to your python-2.6.1 installation.

From what I'm reading, you can edit your environment variables at /etc/launchd.conf, re-assigning your environment variable python to point at Python 3.2 instead of Python 2.6.1.

I hope this works for you; I don't have Mac OS X, so I can't easily help you navigate or know what you're looking at! But, good luck!

And Happy Coding!

EDIT: Here's some more information about environment variables in OS X!

Community
  • 1
  • 1
jwarner112
  • 1,492
  • 2
  • 14
  • 29
0

instead of using python I typed python3 in terminal and it was the solution

sandra
  • 949
  • 3
  • 12
  • 25