Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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,660 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.