Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Setting Up a Local Python Environment Installing Python and Python Libraries Locally Installing Python 3 on Mac OS X

Julius Danek
Julius Danek
4,935 Points

Is it possible to use several version of Python on one machine?

I am using Python 2.7 for a course I am taking at school but I would like to use Python 3 so I can follow the courses at Treehouse concurrently. How would that work? Will my installing Python 3 alter my existing installations? (Currently using the Amazon Spyder IDE)

Julius Danek
Julius Danek
4,935 Points

Oh and I am using Mac OS X

3 Answers

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

You can have multiple versions, yes. I generally prefer pyenv for this. I currently have...4? versions available.

Konrad Pilch
Konrad Pilch
2,435 Points

I had two versions so you should be able too.

Konrad Pilch
Konrad Pilch
2,435 Points

I just had two versions on windows , so i had like python 2 and then i had python 3 in another icon .

Sean T. Unwin
Sean T. Unwin
28,690 Points

Yes you can.

After both versions are installed (2.x and 3.x), then typically, to run Python 3 from the command line you would type python3 to start it, whereas Python 2 is simply, python.

I am unsure how this will affect your IDE, if at all.