Bummer! You must be logged in to access this page.

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

Issue setting up python local environment - Python 2.7, Python 3.4, Canopy

I am having a problem setting up my local python environment for the tutorials on Treehouse. Before starting Treehouse, I had python 2.7 installed on my Windows 7 computer and was doing most of my work from a previous online course in Enthought Canopy.

(I'm Not sure if its relevant, but I was never able to actually run the interpreter from the windows command prompt, I always had to run Idle or canopy.)

As the instructions stated, I downloaded and installed python 3.4 and was then able to run python from the windows command prompt like the video showed.

This is when I encountered my first problem: 1) I typed python in the command line, and python 2.7 began running. I also tried entering "python 3" and "python3"; the only thing it did was result in an error.

My second problem: 2) Inside the command prompt, I tried using python 2.7 to install and run virtualenv. I got an error that it is already installed and located within Canopy. See error below

Next, I tried opening up the python shell for version 3.4 and entered pip install virtualenv. A syntax error was returned highlighting the word install.

Ideally, I would like to be able to run python 2.7, python 3, and Canopy. After searching online I can't seem to find anyone else with this issue.

C:\Users\Hunter>pip install virtualenv Requirement already satisfied (use --upgrade to upgrade): virtualenv in c:\users \hunter\appdata\local\enthought\canopy\user\lib\site-packages Cleaning up...

I apologize for the long post

I've actually encountered the same errors that you are having. I tried reinstalling Python 2.7 and 3.4 and Canopy and I still didn't get it work how I would like. Let me know if you solve the issue!

Will do.

1 Answer

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

So, first off, I know nothing about Canopy. But my first question is, when you installed Python 3.4, you checked the box for adding it to the PATH, right? If you don't do that, Windows won't be able to find the Python 3.4 executable to run when you enter python3.

I'll go look at Canopy.

I am pretty sure I checked the box because everything was installed in the C:\Python34 directory.