How to install Python (any version) in Windows when you've no admin privileges?
From the Python website, download the MSI version of Python you wish to install.
Then open your command prompt and use this command:
msiexec /a python-2.7.10.msi /qb TARGETDIR=C:\python27
Substitute python-2.7.10.msi
, if you downloaded Python 3 and adjust your target directory to where you want it to go.
The /qb
flag will give you a small dialog progress bar.
I downloaded embeddable zip file from the site. Extracted it to the folder of my choice. Then added that folder in the windows path variable (using setx). It worked for me. Well this install only python and not the other packages like pip etc.
Later I found better and simpler way with Python 3.7.0 version for windows.
- Download windows installer exe.
- Run the exe.
- Screen will be shown to chose the installation option.
- Uncheck "install for all users" option.
- Go for the custom installation.
- On next screen specify the directory path for which your user have full access on the computer.
- Uncheck "create shortcuts for installed application" option.
- Make sure "Add python to environment variable" option is Unchecked .
- complete the installation.
- Add the installation and Script folder path in Path using setx
This has installed all the default components of python
I suggest you use Anaconda (open source edition).
Anaconda is a completely free Python distribution (including for commercial use and redistribution). It includes more than 300 of the most popular Python packages for science, math, engineering, and data analysis.
One great feature of Anaconda is that it installs to your home folder, to which you should have write access.
It ships with a conda
script that let's you install packages too.
Keep in mind that you will not be able to add it to the System PATH
, though you can try to add it to your user PATH
. If you can not add it to either, you will have to manually specify the full path to the python executable to run scripts from the command line.