在没有管理员权限的Windows上安装python模块 [英] Install python modules on windows without admin rights

查看:235
本文介绍了在没有管理员权限的Windows上安装python模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作笔记本电脑没有管理员权限.在我的机器上安装了python和pip,版本号如下:

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)

我需要一种方法来利用在线提供的各种python模块.例如- colorama

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

我认为这与以下事实有关-一种.我没有管理员权限,或者b.我在防火墙后面,因此正在执行某种阻止措施

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

我想在这里找到确切的问题,然后回答问题-有没有一种方法可以绕过这些限制并有一种可重复的方法来安装python模块.

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.

请注意,我正坐在公司的便携式计算机中,出于兴趣而学习Python,所以我不想继续要求管理员权限,也不想遇到任何麻烦,因为我试图做一些本不该做的事情在我的笔记本电脑上进行实验.

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.

非常感谢您的帮助.

推荐答案

该帖子已发布7个月了,但这可以帮助其他人.这在没有管理员权限的Windows 10 Pro上对我有用:python.exe -m pip安装

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

这篇关于在没有管理员权限的Windows上安装python模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆