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

How do you import pyperclip package module on Windows 10?

When I type "python" into the command prompt, it tells me I'm running python 2.7.10

I mainly use Python 3.6, rarely 2.7. It seems to have set as my default since I may have installed that version first.

My goal is to install pip and then to install pyperclip so that I can run them in my version 3.6 environment.

I've check forums on how to switch versions through command prompt, control panel etc. but can't seem to figure it out. Any tips would be much appreciated.

Cheers and Happy coding to you all!

Hey, Check your system path. It will be pointing to the original 2.7 installation. You need to change it to point to the installation directory for 3. Reboot and it should be up and running.

Your awesome James,

Thanks to you I was able to get it installed. Below was what ran the successful install in the case someone else runs into the same issue.

py -m pip ensurepip --default-pip
py -m pip install pyperclip