当cmd不断给出值错误时如何安装pandas?

发布于 2025-01-10 15:48:00 字数 8861 浏览 0 评论 0原文

我正在尝试安装 python 以与 Power BI Desktop 一起使用。

我已经下载了3.10版本的python并将其加载到power bi中。 power bi loading python image

现在我打开 CMD 并尝试安装 pandas,但它给了我这个错误,如下所示。

Collecting pandas
  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 ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )'))': /simple/pandas/
  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 ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )'))': /simple/pandas/
  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 ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )'))': /simple/pandas/
  Retrying (Retry(total=1, 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 ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )'))': /simple/pandas/
  Retrying (Retry(total=0, 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 ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )'))': /simple/pandas/
  Could not find a version that satisfies the requirement pandas (from versions: )
No matching distribution found for pandas


我应该怎么办?这是我第一次尝试安装 pandas,我遇到了很多困难

编辑:

我重新安装了 Python 3.7,正如 @seafrog 提到的,它与 powerbi 兼容。然而,它导致了这个问题

C:\Users\Administrator>python -m pip install -Iv pandas==1.0.1
Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
Created temporary directory: C:\Users\ADMINI~1\AppData\Local\Temp\pip-ephem-wheel-cache-f6jngabu
Created temporary directory: C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-a5eghyrs
Collecting pandas==1.0.1
  1 location(s) to search for versions of pandas:
  * https://pypi.org/simple/pandas/
  Getting page https://pypi.org/simple/pandas/
  Looking up "https://pypi.org/simple/pandas/" in the cache
  No cache entry available
  Starting new HTTPS connection (1): pypi.org
  Incremented Retry for (url='/simple/pandas/'): Retry(total=4, connect=None, read=None, redirect=None, status=None)
  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 ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )'))': /simple/pandas/
  Starting new HTTPS connection (2): pypi.org
  Incremented Retry for (url='/simple/pandas/'): Retry(total=3, connect=None, read=None, redirect=None, status=None)
  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 ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )'))': /simple/pandas/
  Starting new HTTPS connection (3): pypi.org
  Incremented Retry for (url='/simple/pandas/'): Retry(total=2, connect=None, read=None, redirect=None, status=None)
  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 ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )'))': /simple/pandas/
  Starting new HTTPS connection (4): pypi.org
  Incremented Retry for (url='/simple/pandas/'): Retry(total=1, connect=None, read=None, redirect=None, status=None)
  Retrying (Retry(total=1, 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 ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )'))': /simple/pandas/
  Starting new HTTPS connection (5): pypi.org
  Incremented Retry for (url='/simple/pandas/'): Retry(total=0, connect=None, read=None, redirect=None, status=None)
  Retrying (Retry(total=0, 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 ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )'))': /simple/pandas/
  Starting new HTTPS connection (6): pypi.org
  Could not fetch URL https://pypi.org/simple/pandas/: connection error: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pandas/ (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )'))) - skipping
  Could not find a version that satisfies the requirement pandas==1.0.1 (from versions: )
Cleaning up...
No matching distribution found for pandas==1.0.1
Exception information:
Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\basecommand.py", line 228, in main
    status = self.run(options, args)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\commands\install.py", line 291, in run
    resolver.resolve(requirement_set)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\resolve.py", line 103, in resolve
    self._resolve_one(requirement_set, req)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\resolve.py", line 257, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\resolve.py", line 210, in _get_abstract_dist_for
    self.require_hashes
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\operations\prepare.py", line 245, in prepare_linked_requirement
    req.populate_link(finder, upgrade_allowed, require_hashes)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\req\req_install.py", line 307, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\index.py", line 533, in find_requirement
    'No matching distribution found for %s' % req
pip._internal.exceptions.DistributionNotFound: No matching distribution found for pandas==1.0.1
Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
1 location(s) to search for versions of pip:
* https://pypi.org/simple/pip/
Getting page https://pypi.org/simple/pip/
Looking up "https://pypi.org/simple/pip/" in the cache
No cache entry available
Starting new HTTPS connection (1): pypi.org
Could not fetch URL https://pypi.org/simple/pip/: connection error: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )'))) - skipping

更新 3/7/2022:

我已经尝试了一切,安装、卸载并再次安装 python,甚至下载 Visual Studio 代码作为 IDE,在网络设置中禁用 IPV6 以及(是的,我再次重新启用它们) ),在(设置中的代理设置)下关闭我的代理

,我已经尝试了一整周,我什至询问了我的主管,并提到这可能是由于代理问题,但他提到,因为程序已下载同一内服务器,它不应该阻止我安装库。

另请注意,他们以前从未使用 PowerBI 安装过 python,所以从技术上讲,我是唯一一个试图弄清楚这一点的人。这是一台工作笔记本电脑,我想知道是否应该尝试在我的家用笔记本电脑上下载并安装库。

I'm trying to install python to use with Power BI Desktop.

I've downloaded the 3.10 version of python and also loaded it in power bi.
power bi loading python image

Now I opened my CMD and tried to install pandas however it gives me this error as shown below.

Collecting pandas
  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 ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )'))': /simple/pandas/
  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 ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )'))': /simple/pandas/
  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 ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )'))': /simple/pandas/
  Retrying (Retry(total=1, 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 ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )'))': /simple/pandas/
  Retrying (Retry(total=0, 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 ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )'))': /simple/pandas/
  Could not find a version that satisfies the requirement pandas (from versions: )
No matching distribution found for pandas


What should I do? this is my first time trying to install pandas and I'm having a lot of difficulties

EDIT:

I reinstalled Python 3.7 as mentioned by @seafrog that it was the compatible on with powerbi. Yet however it is causing this issue

C:\Users\Administrator>python -m pip install -Iv pandas==1.0.1
Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
Created temporary directory: C:\Users\ADMINI~1\AppData\Local\Temp\pip-ephem-wheel-cache-f6jngabu
Created temporary directory: C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-a5eghyrs
Collecting pandas==1.0.1
  1 location(s) to search for versions of pandas:
  * https://pypi.org/simple/pandas/
  Getting page https://pypi.org/simple/pandas/
  Looking up "https://pypi.org/simple/pandas/" in the cache
  No cache entry available
  Starting new HTTPS connection (1): pypi.org
  Incremented Retry for (url='/simple/pandas/'): Retry(total=4, connect=None, read=None, redirect=None, status=None)
  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 ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )'))': /simple/pandas/
  Starting new HTTPS connection (2): pypi.org
  Incremented Retry for (url='/simple/pandas/'): Retry(total=3, connect=None, read=None, redirect=None, status=None)
  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 ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )'))': /simple/pandas/
  Starting new HTTPS connection (3): pypi.org
  Incremented Retry for (url='/simple/pandas/'): Retry(total=2, connect=None, read=None, redirect=None, status=None)
  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 ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )'))': /simple/pandas/
  Starting new HTTPS connection (4): pypi.org
  Incremented Retry for (url='/simple/pandas/'): Retry(total=1, connect=None, read=None, redirect=None, status=None)
  Retrying (Retry(total=1, 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 ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )'))': /simple/pandas/
  Starting new HTTPS connection (5): pypi.org
  Incremented Retry for (url='/simple/pandas/'): Retry(total=0, connect=None, read=None, redirect=None, status=None)
  Retrying (Retry(total=0, 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 ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )'))': /simple/pandas/
  Starting new HTTPS connection (6): pypi.org
  Could not fetch URL https://pypi.org/simple/pandas/: connection error: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pandas/ (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )'))) - skipping
  Could not find a version that satisfies the requirement pandas==1.0.1 (from versions: )
Cleaning up...
No matching distribution found for pandas==1.0.1
Exception information:
Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\basecommand.py", line 228, in main
    status = self.run(options, args)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\commands\install.py", line 291, in run
    resolver.resolve(requirement_set)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\resolve.py", line 103, in resolve
    self._resolve_one(requirement_set, req)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\resolve.py", line 257, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\resolve.py", line 210, in _get_abstract_dist_for
    self.require_hashes
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\operations\prepare.py", line 245, in prepare_linked_requirement
    req.populate_link(finder, upgrade_allowed, require_hashes)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\req\req_install.py", line 307, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\index.py", line 533, in find_requirement
    'No matching distribution found for %s' % req
pip._internal.exceptions.DistributionNotFound: No matching distribution found for pandas==1.0.1
Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
1 location(s) to search for versions of pip:
* https://pypi.org/simple/pip/
Getting page https://pypi.org/simple/pip/
Looking up "https://pypi.org/simple/pip/" in the cache
No cache entry available
Starting new HTTPS connection (1): pypi.org
Could not fetch URL https://pypi.org/simple/pip/: connection error: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )'))) - skipping

UPDATE 3/7/2022:

I've tried everything since, installed, uninstalled and installed python again, even download visual studio code as an IDE, disabled IPV6 in network settings and (yes I reenabled them again), turn off my proxy under (proxy settings in settings)

I've been trying for an entire week now and I even asked my supervisor regarding this and mentioned it is probably due to a proxy issue however he mentioned that since the programs are downloaded within the same server, it shouldn't prevent me from installing the libraries.

Also to note, they have never installed python with PowerBI before so I'm technically the only one trying to figure it out. this is a work laptop, I'm wondering if I should try to download and install libraries on my home laptop.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

微凉徒眸意 2025-01-17 15:48:00

根据微软官方文档(最后更新于2021年4月22日),我相信Power BI目前仅限于Python版本3.7.7:

https://learn.microsoft.com/en-us/power-bi/connect-data/service-python-packages-support

尝试下载 Python 3.7 并根据以下内容安装 Pandas 确切版本 1.0.1此处的图片:

Power BI Python 限制

要安装特定的 Python 库,请使用以下命令(-I 将忽略以前的版本)

pip install -Iv pandas==1.0.1

I believe Power BI is currently limited to Python version 3.7.7 according to Microsoft's official documentation (last updated on 04/22/2021):

https://learn.microsoft.com/en-us/power-bi/connect-data/service-python-packages-support

Try downloading Python 3.7 and installing Pandas exact version 1.0.1 according to the picture here:

Power BI Python limitations

To install a specific Python library, use the command (-I will ignore previous versions)

pip install -Iv pandas==1.0.1
给不了的爱 2025-01-17 15:48:00

好吧,大家,经过整整一周的绞尽脑汁,因为我尝试了每一个解决方案,这是一个非常简单的任务,基本上如果你连接到你的工作互联网并且它有代理,
首先禁用代理

控制面板>网络和互联网>互联网选项>连接> lan 设置并禁用此代理设置

同时添加“https://pypi.lan”。 org.* 到高级>例外之下
此处

,然后转到您的互联网连接并切换到未连接到您公司代理的另一个连接。 (您可以尝试连接到您的家庭互联网连接)

然后只需运行 pip install pandas 即可。

它应该有效。

是的,这是一个简单的解决方案,但我不知道为什么即使在禁用代理之后,它也不会改变。我仍然是一个新手,所以我希望任何可能遇到类似困境的人都能如此。

ps感谢所有评论和帮助的人!

Okay everyone, after a whole week of beating my head because I tried every single solution, it was a very simple task, basically if you are connected to your works internet and it has proxy,
firstly disable the proxy

control panel > network and internet > internet options > connections > lan settings and disable this proxy settings

while you're there add 'https://pypi.org.* to the under advanced>exceptions
here

then go to your internet connections and switch to another connection that is not connected to your company's proxy. (you could try connecting to your homes internet connection)

then simply run pip install pandas.

it should work.

this was a simple solution yes but I had no idea why even after disabling my proxy, it wouldn't budge. I'm still a newbie so I hope this anyone who might come under a similar predicament.

p.s thank you to everyone who commented and helped!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文