I have recently started learning python using code academy and today I downloaded everything that I thought I would use. I downloaded Python and Atom. I have two separate drives on my computer. An SSD with not much storage and a hard drive with a lot of storage. My Windows is installed on the SSD, but I wanted to download python and atom on the hard drive, so I did so. When I installed Python I made sure to check add to PATH and the environmental variable thing. Now when I go to the command prompt, it shows "C:\Users\Gustavo>" but my python is installed on a different drive. Is there a way I could make this work? Thanks a lot.
-
2The PATH is not used to determine where things are installed; it is a list of places your OS look to find an executable that match the command you type.. So if Python has been installed in your path, and you open a FRESH command prompt, and type **python** it should work, whereever Python is installed. – trajekolus Nov 04 '17 at 04:32
-
Please provide more info about making what work?, what's the error showing in your console? It seems like you just need to type python and it would work as long as your add the python path to your ENV. – zhiqiang huang Nov 04 '17 at 04:32
-
What happens when you try to run `python`? – wjandrea Nov 04 '17 at 04:44
1 Answers
There are two ways to install python:
- Download directly from the website
- Use a package manager
Case 1: Download directly from the website
- Go to the python's website to download the version you would like to use.
- Install the downloaded file (During the installation you can customize the installation directory)
- Make sure to enable "Add python.exe to Path"
- After installation has been completed, open your command prompt and type
where python
. Your python directory should be printed. - If all is good, then typing
python
should launch python in your command prompt. You can also run python by cd in the directory where your python is located and launch the .exe
You have mentioned about changing path and environmental variables, and that's probably for the purpose of keeping multiple versions of python. If that's the case, there's actually a quick fix for this:
- Go to the folder where you installed Python.
- Copy the python.exe file, and rename that copy in the same directory as python3.exe (If you installed version 2, then rename as python2.exe).
- Now in command prompt type python2 or python3 and you should be able to launch either versions respectively.
Note: If you face issues regarding paths, then you should detail the error messages.
Case 2: Use a package manager
- Choose a package manger: chocolatey, scoop, and others.
Check out these links for changing package manager's installation directory, installation method varies by the managers, so you should consult the developers should you experience problems:
Package managers will manage the versions for you, if you choose to install multiple versions. You should refer to the package manager's website for detailed information. However, you can quickly check the installed version by typing
python --version
. The python version number should be printed back to you, same applies to python3.Double check your installation directory by
which python
Type
python
orpython3
to run your python of choice.
Lastly, you have mentioned atom. Atom is just a text editor: you can write python codes with it.
When you are done editing, you can open the command prompt and navigate to where your code resides, and type
python filename.py
This will run your code directly from the command prompt. There are many atom plugins available to make this process seamlessly integrated within atom. iPython and Jupyter plugins are first things that comes to my mind, you should specifically check out Hydrogen
.

- 1,055
- 3
- 23
- 46
-
This answer is very unclear. OP didn't mention anything about a package manager. Do they need to use a package manager to fix this issue? When you say "From there", do you mean "inside the installation directory", or "once that's done"? – wjandrea Nov 04 '17 at 04:49
-
@wjandrea Thank you for addressing issues with my answer. I have expanded to cover some of the things you have mentioned. I know the installation answer can be improved, and if that's the case, feel free to let me know what I can clarify further. thanks! – Joseph K. Nov 04 '17 at 05:34
-
1Yes, nicely improved. Honestly, I'm not sure if it answers the question, since the question is not clear, but you've given enough info that OP should be able to find a solution. – wjandrea Nov 04 '17 at 05:52
-
@wjandrea now that the answer is improved, I would appreciate it if you can undo the downvote to this answer if you have done so. :) – Joseph K. Nov 04 '17 at 18:20