Bharat Anand
Bharat Anand

Reputation: 484

Install python modules on windows without admin rights

I do not have admin rights on my work laptop. Have got python and pip installed on my machine, version numbers as below:

C:\Users\banand\AppData\Local\Programs\Python\Python36\Scripts>python --version
Python 3.6.1

C:\Users\banand\AppData\Local\Programs\Python\Python36\Scripts>pip --version
pip 9.0.1 from c:\users\banand\appdata\local\programs\python\python36\lib\site-packages (python 3.6)

I need a way to make use of various python modules available online. An example is - colorama

As per the instructions, I tried the below command without any success:

C:\Users\banand\AppData\Local\Programs\Python\Python36\Scripts>pip install colorama --user
Collecting colorama
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x000001D431204F28>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',)': /simple/colorama/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x000001D431204A58>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',)': /simple/colorama/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x000001D431204780>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',)': /simple/colorama/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x000001D431204BA8>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',)': /simple/colorama/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x000001D431204898>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',)': /simple/colorama/
  Could not find a version that satisfies the requirement colorama (from versions: )
No matching distribution found for colorama

I believe that this has something to do either with the fact that - a. I do not have admin rights, OR b. I am behind a firewall and hence some sort of block is being exercised

I want to find out the exact issue here and then answer the question - is there a way to circumvent around these limitation and have a repeatable method to install python modules.

Kindly note that I am in an corporate laptop and learning to Python out of interest, so I do not want to go ahead and request Admin rights nor want to get into any trouble because I tried to do something which was not supposed to be experimented on my laptop.

Any help is greatly appreciated.

Upvotes: 7

Views: 46415

Answers (3)

I tried right on Jupiter notebook and it worked perfectly:

code:

import sys

!{sys.executable} -m pip install xarray

sysmtem answer:

Collecting xarray
  Using cached https://files.pythonhosted.org/packages/10/6f/9aa15b1f9001593d51a0e417a8ad2127ef384d08129a0720b3599133c1ed/xarray-0.16.2-py3-none-any.whl
Requirement already satisfied: setuptools>=38.4 in c:\anaconda3\lib\site-packages (from xarray) (41.0.1)
Requirement already satisfied: numpy>=1.15 in c:\anaconda3\lib\site-packages (from xarray) (1.16.4)
Requirement already satisfied: pandas>=0.25 in c:\anaconda3\lib\site-packages (from xarray) (1.2.1)
Requirement already satisfied: pytz>=2017.3 in c:\anaconda3\lib\site-packages (from pandas>=0.25->xarray) (2019.1)
Requirement already satisfied: python-dateutil>=2.7.3 in c:\anaconda3\lib\site-packages (from pandas>=0.25->xarray) (2.8.0)
Requirement already satisfied: six>=1.5 in c:\anaconda3\lib\site-packages (from python-dateutil>=2.7.3->pandas>=0.25->xarray) (1.12.0)
Installing collected packages: xarray
Successfully installed xarray-0.16.2

Upvotes: 0

Sukant Ranjan
Sukant Ranjan

Reputation: 41

  1. Install Anaconda (Don't need admin rights) ->
  2. Open Spyder ->
  3. Goto Terminal and type ->
import sys

!{sys.executable} -m pip install pandas

Upvotes: 4

Meziane
Meziane

Reputation: 1667

The post is 7 months old, but this can help others. This worked for me on Windows 10 Pro without admin privileges: python.exe -m pip install

Upvotes: 7

Related Questions