在PyCharm社区版中安装mysql

2024-04-26 00:36:00 发布

您现在位置:Python中文网/ 问答频道 /正文

我以前没能找到这个问题,这让我发疯了。如果这个问题是重复的,如果有人能给我指出答案,我将不胜感激。在

我尝试使用python3.6在PyCharm终端中安装mysql(使用pip install mysql)。这是我得到的错误。我已经把pip更新到了最新版本。在

Command "C:\Users\David\PycharmProjects\cryptocurrency2\cryptocurrencytrading\Scripts\python.exe -u -c "import setuptools, tokenize;file='C:\Users\David\AppData\Local\Temp\pip-install-alqyprfu\mysqlclient\setup.py';f=getattr(tokenize, 'open', open)(f ile);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\David\AppData\Local\Temp\pip-record-gcaxj074\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\David\PycharmProjects\cryptocurrency2\cryptocurrencytrading\include\site\python3.6\mysqlclient" failed with error code 1 in C:\Users\David\AppData\Local\Temp\pip-install-alqyprfu\mysqlclient\ You are using pip version 10.0.1, however version 18.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.


Tags: installpipversionlocalmysqlcoderecordusers
2条回答

尝试使用python -m pip install upgrade pip 你的pip版本太低了

您可以使用PyCharm的包管理器在PyCharm中安装python包,而不需要pip。请参考他们关于安装软件包的官方文件here

或者,您也可以始终使用OS cmd显式安装软件包。在

我建议您通过以下方式更新pip版本:

python -m pip install  upgrade pip

希望这有帮助!在

相关问题 更多 >

    热门问题