Sometimes it is useful to install Python in a preferred directory other than to a default Windows partition directory. The main reasons for doing this are given below:
- Have multiple Python versions and run them as per requirements (use Python versions 2.7 and 3 simultaneously on the same system)
- Have Python Interpreter on a portable disk (Python on the go)
- Tryout experimental and latest Python versions and Python packages/libraries (leave the default system Python Interpreter unaltered)
Installing Python without admin rights:
Step 1: Download Python installer(msi file) from official website https://www.python.org/
Step 2: Open up Windows Command Prompt where msi file is downloaded and execute the following command,
msiexec /a python-2.7.10.msi /qb TARGETDIR=G:\Python27
Here, TARGETDIR specifies the target folder where Python will be installed.
Once setup is finished you should be able to find python.exe (Python Interpreter) and IDLE (Python Integrated Development Environment) in the G:\python27 and G:\Python27\Lib\idlelib folders respectively.
Step 3: Install pip Python utility script for installing Python packages/libraries by downloading get-pip.py file and executing the following command from the G:\Python27 folder,
python.exe get-pip.py
Step 4: Install Python packages/libraries using pip by executing the following commands from G:\Python,
python.exe -m pip install numpy
Here, numpy is Python package/library name which will be download and installed to Python Interpreter directory by the pip utility. If a package/library is not available in the standard Python pip repository then you can download pip install-able (whl files) Python packages/libraries from pythonlibs and install them by executing following command from G:\Python27, assuming whl files are placed in the same folder,
python.exe -m pip install numpy‑1.11.3+mkl‑cp27‑cp27m‑win32.whl
Cheers!
Thanks for sharing, nice post! Post really provice useful information!
ReplyDeleteGiaonhan247 chuyên dịch vụ vận chuyển hàng đi mỹ cũng như dịch vụ ship hàng mỹ từ dịch vụ nhận mua hộ hàng mỹ từ website nổi tiếng Mỹ là mua hàng amazon về VN uy tín, giá rẻ.