Cntlm是一个NTLM/NTLM会话响应/ NTLMv2,用于验证HTTP代理,旨在帮助您摆脱Microsoft专有世界的链条.
我有以下格式的代理URL:
http://user:passwords@my_proxy_server.com:80
Run Code Online (Sandbox Code Playgroud)
我必须提供这些信息cntlm.其配置文件cntlm.ini具有以下结构和参数:
Username
Domain
Password
Proxy
Run Code Online (Sandbox Code Playgroud)
我不确定,如何分解我原来的代理属性来填补这四个选项?
我的计算机在Windows服务器上运行Windows后面的窗口(使用活动目录),我无法弄清楚如何通过它pip(在python3中).我尝试过使用--proxy,但它仍然只是超时.我也试过设置一个长时间超时(60s),但这没有任何区别.我的代理设置是正确的,我将它们与我在TortoiseHG中成功使用的设置进行了比较以确保.
是否还有其他任何人都知道我可以尝试的技巧,或者pip对于Windows代理有什么限制吗?
更新:我失败的尝试涉及搜索pypi.我刚尝试安装一些东西,但它确实有效.但搜索仍然失败.这是否表示存在错误pip或者它们的工作方式不同?
我正在尝试运行安装pip:get-pip.py的脚本,并且由于我的网络在HTTP代理后面而导致连接超时.有没有什么方法可以在我的Python 2.7安装中配置HTTP代理,以便能够安装我想要安装的内容?
注意:我使用的是Windows.以下是我得到的错误:
C:\SetupFiles>python get-pip.py
Downloading/unpacking pip
Cannot fetch index base URL http://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement pip
No distributions at all found for pip
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用python包管理器pip来安装包,它是来自互联网的依赖项.但是我在我的大学里代理了一个代理,并且已经设置了http_proxy环境变量.但是当我尝试安装这样的包时:
pip install TwitterApi
Run Code Online (Sandbox Code Playgroud)
我在日志文件中收到此错误:
Getting page http://pypi.python.org/simple/TwitterApi
Could not fetch URL http://pypi.python.org/simple/TwitterApi: <urlopen error [Errno 111] Connection refused>
Will skip URL http://pypi.python.org/simple/TwitterApi when looking for download links for TwitterApi
Getting page http://pypi.python.org/simple/
Could not fetch URL http://pypi.python.org/simple/: <urlopen error [Errno 111] Connection refused>
Run Code Online (Sandbox Code Playgroud)
我甚至试着像这样明确地设置我的代理变量:
pip install --proxy http://user:password@proxyserver:port TwitterApi
Run Code Online (Sandbox Code Playgroud)
但我仍然得到同样的错误.如何让pip在代理服务器后面工作.
运行Airflow的常用说明不适用于Windows环境:
# airflow needs a home, ~/airflow is the default,
# but you can lay foundation somewhere else if you prefer
# (optional)
export AIRFLOW_HOME=~/airflow
# install from pypi using pip
pip install airflow
# initialize the database
airflow initdb
# start the web server, default port is 8080
airflow webserver -p 8080
Run Code Online (Sandbox Code Playgroud)
Airflow实用程序在命令行中不可用,我无法在其他地方找到它以手动添加.Airflow如何在Windows上运行?
试图在新的python安装上安装pip.我遇到了代理错误.看起来像是一个错误get-pip或urllib3??
问题是我必须经历如此处所述的设置CNTLM的痛苦还是有快捷方式?
get-pip.py文档说使用--proxy="[user:passwd@]proxy.server:port"选项来指定代理和相关的身份验证.但似乎pip传递了整个事物,因为它将urllib3"myusr"解释为url方案,因为':'我想(?).
C:\ProgFiles\Python27>get-pip.py --proxy myusr:mypswd@111.222.333.444:80
Downloading/unpacking pip
Cleaning up...
Exception:
Traceback (most recent call last):
File "c:\users\sg0219~1\appdata\local\temp\tmpxwg_en\pip.zip\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "c:\users\sg0219~1\appdata\local\temp\tmpxwg_en\pip.zip\pip\commands\install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "c:\users\sg0219~1\appdata\local\temp\tmpxwg_en\pip.zip\pip\req.py", line 1177, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "c:\users\sg0219~1\appdata\local\temp\tmpxwg_en\pip.zip\pip\index.py", line 194, in find_requirement
page = self._get_page(main_index_url, req)
File "c:\users\sg0219~1\appdata\local\temp\tmpxwg_en\pip.zip\pip\index.py", line 568, in _get_page
session=self.session,
File "c:\users\sg0219~1\appdata\local\temp\tmpxwg_en\pip.zip\pip\index.py", line 670, in get_page
resp …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用下面的pip install命令,但它失败了代理身份验证需要问题.我已经在RHEL7.x服务器中配置了代理.
Command Used: `pip install --proxy https://'username:pwd'@proxy:host --upgrade pip`
Run Code Online (Sandbox Code Playgroud)
日志:
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/pip/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/pip/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/pip/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after …Run Code Online (Sandbox Code Playgroud) 我正在通过SSH和OPENVPN控制远程单元。
在远程单元上,我想使用pip但安装一些Python软件包:
pip);减少尝试时间(我不是系统管理员,我对此主题的了解非常有限),其想法是打开一个显而易见的SSH端口转发:
ssh -R 9999:pypi.python.org:443 xxxx@XX.XX.XX.XX
然后,在远程单元上播放pip install:
pip install pymodbus==1.3.2 --proxy localhost:9999
但是此命令返回:
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement pymodbus==1.3.2
Run Code Online (Sandbox Code Playgroud)
/root/.pip/pip.log 是:
Getting page https://pypi.python.org/simple/pymodbus/
Could not fetch URL https://pypi.python.org/simple/pymodbus/: connection error: ('Connection aborted.', BadStatusLine("''",))
Will skip URL https://pypi.python.org/simple/pymodbus/ when looking for download links for pymodbus==1.3.2
Getting page https://pypi.python.org/simple/
Could not fetch URL https://pypi.python.org/simple/: connection …Run Code Online (Sandbox Code Playgroud) 我正在尝试安装特定的 Spacy 模型“en_core_web_sm”。由于代理服务器限制我无法控制我的环境中的代理服务器限制,我无法执行此操作。
我按照他们的文档中的建议使用以下命令:https : //github.com/explosion/spacy-models
pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.1.0/en_core_web_sm-2.1.0.tar.gz
Run Code Online (Sandbox Code Playgroud)
我想另一种方法是手动下载 zip 并将其复制到适当的目录。我无法弄清楚在我的 Anaconda 设置中放置这些文件的位置以使其工作。
有人可以建议我可以将这些文件放在哪里或提出替代方案吗?
(我已经完成了设置代理等,它适用于许多其他库,甚至安装了 Spacy 本身,但这个特定模型拒绝安装)
我尝试使用代理进行 pip install,代理设置是正确的,因为它适用于 npm install 。我尝试的是如下所示,但收到错误消息。任何想法都非常受欢迎!
set http_proxy=http://<username>:<password>@<proxy_server>:<port>
set https_proxy=https://<username>:<password>@<proxy_server>:<port>
pip install Flask
Collecting Flask
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required'))': /simple/flask/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required'))': /simple/flask/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required'))': …Run Code Online (Sandbox Code Playgroud) 我的工作使用带有.pac配置文件的代理连接到 Internet。这让我很头疼让 git 之类的东西工作(设法让它工作),现在我正在尝试配置 Python,我安装了它(Windows),现在我正在尝试获取一些库,例如request或lxml,但是 pip无法连接到互联网
'连接中止。', gaierror(11004, 'getaddrinfo failed'))'/simple/lxml/
我知道是代理问题,我不认为我可以使它工作,所以我的问题是:
有没有办法从网页下载库然后手动安装它们?
我在https://pypi.python.org找到了其中的一些,但我希望能够在家下载一个库,获取文件然后在工作中安装它
我的场景:
我正在尝试在我新安装的ubuntu中安装python和postgresql,它通过windows 7上的virtualbox运行。它使用我公司的网络,并且我已经在ubuntu的网络设置中设置了代理。
我可以使用 mozilla(ubuntu) 浏览和下载,没有任何问题。
问题:
但是当我尝试使用终端安装软件包时,它只是停在 0% 处。它尝试了各种 IP,但 我的终端截图仍然为 0%
[更新] - 最终无法连接到IP
尝试过:
我已经尝试过通过导出代理设置
sudo -H gedit /etc/profile.d/proxy.sh
并更新了文件
导出http_proxy= http://用户名:密码@proxyhost:端口/
(我也设置为https)
请让我知道出了什么问题?