我在安装 python 3 模块时遇到了一些问题。
我正在尝试使用 pip 安装 mysql :
python -m pip install mysql
对于 python 3.4.4,这是我得到的错误:
error: command 'C:\\Program Files (x86\\Microsoft Visual Studio 10.0\\VC\\BIN\\cl.exe' failed with exit status 2
这是截图:screenshot of the error message
我之前在安装模块时遇到了其他问题,我通过安装 Visual Studio C++ 2010 解决了这些问题
顺便说一句,其他模块的安装工作得很好。
我的规范:
window 10 x64
Python 3.4.4 x86
最佳答案
我遇到了这个问题,我可以在 PyCharm(版本:2019.2)中解决它,如下所示:
1-1- 打开项目设置(文件 > 设置...)(Mac 上的首选项)
1-2- 项目 > 项目解释器
1-3- 按
+
按钮1-4-类型
pip
在顶部搜索框中1-5-在右下角选择
specify version
并确保使用最新版本1-6-按
Install Package
按钮 您还可以通过以下命令在 windows 中通过 cmd 查找 pip 的当前版本:
pip -V
然后通过以下命令更新 pip:pip install --upgrade pip
2- 转至
File > Settings... > Project > Project:Interpreter
并更新 pip
pip 击upgrade
按钮如下图( pip 击右侧边栏向上的小箭头):enter image description here
3- 和第一步一样,安装最新版本的
matplotlib
(此时它的最新版本是3.2)
关于visual-studio-2010 - Python 错误 : command '...\Microsoft Visual Studio 10.0\\VC\\BIN\\cl.exe' failed with exit status 2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36377777/