gpt4 book ai didi

mysql - 无法安装 MySQL-Connector 库

转载 作者:行者123 更新时间:2023-11-29 02:39:38 24 4
gpt4 key购买 nike

我使用 mysql-connector 2.1.8 有一段时间了,突然间,它不再可用了。

Could not find a version that satisfies the requirement mysql-connector==2.1.8 (from versions: 2.2.8)

我尝试安装一些较新的版本,例如 2.2.5。从字面上看,它只工作了一次,然后就没有在服务器上工作了。

而最新的2.2.8版本报错如下:

Collecting mysql-connector==2.2.8
Using cached https://files.pythonhosted.org/packages/8e/78/049f747325ce0154263cd1b10fe7ea9ddb17e839111c6f8f824d5964cfb5/mysql-connector-2.2.8.tar.gz
Installing collected packages: mysql-connector
Running setup.py install for mysql-connector ... error
Complete output from command /home/liudas/PycharmProjects/eneba_what_place/venv/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-7rlbpvfn/mysql-connector/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-kbw8r138/install-record.txt --single-version-externally-managed --compile --install-headers /home/liudas/PycharmProjects/eneba_what_place/venv/include/site/python3.6/mysql-connector:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help

error: option --single-version-externally-managed not recognized

最佳答案

pip install -U setuptools wheel

较新的包版本可能需要 setuptools 或 wheel 的较新功能,所以这是导致 --single-version-externally-managed not recognized 的原因使此类核心包保持最新是一件好事,而且它们几乎总是向后兼容。

关于mysql - 无法安装 MySQL-Connector 库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55453626/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com