7

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.

9
  • 2
    Have you tried downloading the wheel (.whl) file listed on the package download page and then pip install -U colorama-0.3.9-py2.py3-none-any.whl --user? From the logs you posted it looks like some kind of connectivity issue, perhaps caused by some Windows Firewall setting Commented Jul 24, 2018 at 5:07
  • @metatoaster, I have tried installing using the command line and also by downloading a zipped package file. I came across the wheel file today, have downloaded it but not yet tried, will try this later tonight and update Commented Jul 24, 2018 at 6:34
  • You may also need to see what other packages pip has collected; it is likely that getting your system administrator to approve pip or python as one of the applications permitted to access to Internet would be the most convenient outcome. Commented Jul 24, 2018 at 6:37
  • 1
    FYI, there is no reason for a --user install in your case. You already have a per-user installation in %LocalAppData%, which should have added its "Scripts" directory to PATH. --user installs use the roaming %AppData% directory instead, and the corresponding "Scripts" directory is not added to PATH. Commented Jul 24, 2018 at 7:20
  • 1
    You may want to take a course like this: codecademy.com/learn/learn-python It's free and all the python is done in a browser, it's a good place to start Commented Jul 24, 2018 at 13:34

3 Answers 3

8

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

Sign up to request clarification or add additional context in comments.

Comments

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

!{sys.executable} -m pip install pandas

1 Comment

'C:\Program' is not recognized as an internal or external command, operable program or batch file.
0

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

2 Comments

You should better format your answers when it contains terminal output
'C:\Program' is not recognized as an internal or external command, operable program or batch file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.