我正在尝试在我的virtualenv中为python安装mysqlclient。它失败并显示以下内容:
#include "Python.h"
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)
经过一番研究,我发现我需要安装python-dev。我已经将它安装在我的主目录(即/ usr / bin ...)中,但是没有安装virtualenv,但是每次我键入:
sudo apt-get install python-dev
Run Code Online (Sandbox Code Playgroud)
我得到以下回应:
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 453 not upgraded.
Run Code Online (Sandbox Code Playgroud)
显示其可用性,在virtualenv mysqlclient外部正确安装。问题是如何将python-dev安装纠正到virtualenv