有一个错误检查最新版本的PIP

发布于 2025-02-02 23:38:40 字数 2277 浏览 2 评论 0原文

我遇到了这两个警告问题: 存在错误

警告:忽略无效的分发-ip警告:检查最新版本的PIP。如何解决它

C:\Users\ABDOU-ID>mysql-connector-python --version
'mysql-connector-python' is not recognized as an internal or external command, operable program or batch file.

C:\Users\ABDOU-ID>mysql-connector-python
'mysql-connector-python' is not recognized as an internal or external command, operable program or batch file.

C:\Users\ABDOU-ID>pip install mysql-connector-python
WARNING: Ignoring invalid distribution -ip (c:\users\abdou-id\appdata\local\packages\pythonsoftwarefoundation.python.3.9
qbz5n2kfra8p0\localcache\local-packages\python39\site-packages) 
WARNING: Ignoring invalid distribution-ip (c:\users\abdou-id\appdata\local\packages\pythonsoftwarefoundation.python.3.9 _qbz5n2kfra8p0\localcache\local-packages\python39\site-packages)
Requirement already satisfied: mysql-connector-python in c:\users\abdou-id\appdata\local\packages\pythonsoftwarefoundati
on.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (8.0.29) Requirement already satisfied: protobuf>=3.0.0 in c:\users\abdou-id\appdata\local\packages\pythonsoftwarefoundation.pyth
on.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from mysql-connector-python) (4.21.1) Ignoring invalid distribution -ip (c:\users\abdou-id\appdata\local\packages\pythonsoftwarefoundation.python.3.9

WARNING:_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages) 
WARNING: Ignoring invalid distribution-ip (c:\users\abdou-id\appdata\local\packages\pythonsoftwarefoundation.python.3.9
_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages)

WARNING: Ignoring invalid distribution-ip
(c:\users\abdou-id\appdata\local\packages\pythonsoftwarefoundation.python.3.9
qbz5n2kfra8p0\localcache\local-packages\python39\site-packages)

WARNING: Ignoring invalid distribution -ip (c:\users\abdou-id\appdata\local\packages\pythonsoftwarefoundation.python.3.9
qbz5n2kfra8p0\localcache\local-packages\python39\site-packages)

WARNING: There was an error checking the latest version of pip.
C:\Users\ABDOU-ID>

警告:有一个错误检查最新版本的PIP

警告:忽略无效分布-IP

I am getting these two warning problems:
WARNING: Ignoring invalid distribution -ip and WARNING: There was an error checking the latest version of pip.

How to resolve it?

C:\Users\ABDOU-ID>mysql-connector-python --version
'mysql-connector-python' is not recognized as an internal or external command, operable program or batch file.

C:\Users\ABDOU-ID>mysql-connector-python
'mysql-connector-python' is not recognized as an internal or external command, operable program or batch file.

C:\Users\ABDOU-ID>pip install mysql-connector-python
WARNING: Ignoring invalid distribution -ip (c:\users\abdou-id\appdata\local\packages\pythonsoftwarefoundation.python.3.9
qbz5n2kfra8p0\localcache\local-packages\python39\site-packages) 
WARNING: Ignoring invalid distribution-ip (c:\users\abdou-id\appdata\local\packages\pythonsoftwarefoundation.python.3.9 _qbz5n2kfra8p0\localcache\local-packages\python39\site-packages)
Requirement already satisfied: mysql-connector-python in c:\users\abdou-id\appdata\local\packages\pythonsoftwarefoundati
on.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (8.0.29) Requirement already satisfied: protobuf>=3.0.0 in c:\users\abdou-id\appdata\local\packages\pythonsoftwarefoundation.pyth
on.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from mysql-connector-python) (4.21.1) Ignoring invalid distribution -ip (c:\users\abdou-id\appdata\local\packages\pythonsoftwarefoundation.python.3.9

WARNING:_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages) 
WARNING: Ignoring invalid distribution-ip (c:\users\abdou-id\appdata\local\packages\pythonsoftwarefoundation.python.3.9
_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages)

WARNING: Ignoring invalid distribution-ip
(c:\users\abdou-id\appdata\local\packages\pythonsoftwarefoundation.python.3.9
qbz5n2kfra8p0\localcache\local-packages\python39\site-packages)

WARNING: Ignoring invalid distribution -ip (c:\users\abdou-id\appdata\local\packages\pythonsoftwarefoundation.python.3.9
qbz5n2kfra8p0\localcache\local-packages\python39\site-packages)

WARNING: There was an error checking the latest version of pip.
C:\Users\ABDOU-ID>

WARNING: There was an error checking the latest version of pip

WARNING: Ignoring invalid distribution -ip

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

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

发布评论

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

评论(11

紫南 2025-02-09 23:38:41

编辑:此问题已固定在PIP 23.3.1中。运行PIP安装 - 升级PIP以安装最新版本的PIP。

该答案的其余部分仅具有历史意义。


即使在升级到PIP 23.3之后,这也一直在发生。我最终在上一次检查时发现了PIP缓存,并且持有此缓存的文件可能会损坏。

以下命令清除了PIP的更新缓存,并允许PIP在下次运行时检查更新。它不会删除缓存的软件包。

根据您的操作系统选择以下内容之一:

Linux

在终端中运行此命令。

rm -r ~/.cache/pip/selfcheck/

OSX

在终端中运行此命令。

rm -r ~/Library/Caches/pip/selfcheck/

Windows

使用PowerShell运行此功能。

rm -r $env:LOCALAPPDATA\pip\cache\selfcheck\

Edit: This issue has been fixed in pip 23.3.1. Run pip install --upgrade pip to install the latest version of pip.

The rest of this answer is of historical interest only.


This kept happening for me, even after upgrading to pip 23.3. I eventually figured out pip caches the last time it checked for updates, and the file holding this cache can be corrupted.

The following command clears pip's update cache and allows pip to check for updates the next time it is run. It does not remove cached packages.

Choose one of the following based on your operating system:

Linux

Run this command in the terminal.

rm -r ~/.cache/pip/selfcheck/

OSX

Run this command in the terminal.

rm -r ~/Library/Caches/pip/selfcheck/

Windows

Run this using PowerShell.

rm -r $env:LOCALAPPDATA\pip\cache\selfcheck\
天煞孤星 2025-02-09 23:38:41

您需要手动更新pip与:

python -m pip install --upgrade pip

根据问题页面上的问题github

编辑:

如果这不起作用,我建议阅读以下答案:

https://stackoverflow.com/a/a/7729834/14141412223


现在应该在将来的版本中固定PIP

pull request 在github上

You need to manually update pip with:

python -m pip install --upgrade pip

As per discussion on the issues page on Github

Edit:

If this doesn't work, I suggest reading the following answer:

https://stackoverflow.com/a/77298334/14141223


This issue should now be fixed in future versions of pip

Pull request on Github

风尘浪孓 2025-02-09 23:38:41

这对我有用:

python -m pip install --upgrade pip

This worked for me:

python -m pip install --upgrade pip
木森分化 2025-02-09 23:38:41

这只是升级PIP的警告,您可以使用这些命令

python -m pip install --upgrade pip 

pip install --upgrade pip

欢呼的伴侣 来执行此操作
“

It's Just a Warning for upgrading the pip you can do it with any of these commands

python -m pip install --upgrade pip 

or

pip install --upgrade pip

Cheers Mate
Pip Installation Image

殤城〤 2025-02-09 23:38:41

我在Windows 10上使用git bash,这是对我有用的唯一解决方案:

  1. 在bash中执行此操作:python -m pip cache dir
  2. 打开从步骤1
  3. 删除 输出的输出返回的文件夹自我检查文件夹

您不应再收到此错误。

I use Git Bash on Windows 10, and this is the only solution that worked for me:

  1. Execute this in bash: python -m pip cache dir
  2. Open the folder returned from the output you got in step 1
  3. Delete the selfcheck folder

You should no longer get this error.

姜生凉生 2025-02-09 23:38:41

你尝试过

python -m pip install --upgrade pip

还是

pip install --upgrade pip

好运

have you tried:

python -m pip install --upgrade pip

or

pip install --upgrade pip

Good luck

玩套路吗 2025-02-09 23:38:41

我有MacBook M2,我偶然发现了这个问题。
试图通过:

python -m pip install --upgrade pip

目前尚未解决我的问题,

pip install --upgrade pip

我尚未解决我的问题

,我降级到以前的PIP:

pip install -U pip==23.2.1

您可以随时从pypi.org/检查版本历史记录

I have macbook m2 and I've stumble on this issue.
Tried to update pip manually by:

python -m pip install --upgrade pip

and

pip install --upgrade pip

both did NOT solve my problem

For now, I downgrade to previous version of pip by:

pip install -U pip==23.2.1

Anytime you can check the version history from pypi.org/

鹊巢 2025-02-09 23:38:41

运行Python -M Pip install -upgrade pippip install -upgrade pip如此答案sslerror(“ decryption_failed_or_or_bad_record_mac”)中导致

断开我的VPN允许pip连接。

Running python -m pip install --upgrade pip or pip install --upgrade pip as shown in this answer results in SSLError ("DECRYPTION_FAILED_OR_BAD_RECORD_MAC").

Disconnecting my VPN allowed pip to connect.

好菇凉咱不稀罕他 2025-02-09 23:38:41

为了解决这个问题,可以遵循这两种方法之一。


  1. 清除PIP更新缓存:

根据您的操作系统,将适当的命令运行到
清除pip更新缓存:

  • linux上:

      rm -r〜/.cache/pip/pip/selfcheck/
     
  • MacOS(OS X)上:

      rm -r〜/library/caches/pip/pip/selfcheck/
     
  • 上:

    Windows(PowerShell):

      rm -r $ env:localappdata \ pip \ cache \ selfcheck \
     

  1. 手动更新PIP:

您可以使用以下命令之一更新pip,具体取决于您的喜好:

  • 使用Python:

      python -m pip install -upgrade pip
     
  • 直接使用pip直接:

      PIP安装 - 升级PIP
     

注意:使用适当的命令以删除更新缓存。

To solve this problem, one of these two methods can be followed.


  1. Clear the pip update cache:

Depending on your operating system, run the appropriate command to
clear the pip update cache:

  • On Linux:

    rm -r ~/.cache/pip/selfcheck/
    
  • On macOS (OS X):

    rm -r ~/Library/Caches/pip/selfcheck/
    
  • On Windows (PowerShell):

    rm -r $env:LOCALAPPDATA\pip\cache\selfcheck\
    

  1. Manually Update pip:

You can update pip using one of the following commands, depending on your preference:

  • Using Python:

    python -m pip install --upgrade pip
    
  • Using pip directly:

    pip install --upgrade pip
    

Note: Use the appropriate command for your operating system to delete the update cache.

穿越时光隧道 2025-02-09 23:38:41

我使用- 强制式reinstall标志来升级PIP,并修复了警告。

I used --force-reinstall flag to get pip to upgrade, and that fixed the warning.

梦晓ヶ微光ヅ倾城 2025-02-09 23:38:41

检查您是否已经用完磁盘空间。当我的磁盘已满时,我遇到了这个错误,并且没有安装任何新更新或软件包的空间。

尝试DF -LH命令如果使用基于Linux的环境(Ubuntu,Mac等)

Check whether you have run out of disk space or not. I got this error when my disk was full and there was no space to install any new updates or packages.

Try df -lh command if using an linux based environment (Ubuntu, Mac, etc.)

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