Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (50.2k points)

I am currently working with Python 3.5 and when I am trying to install MySQL:

pip install mysql-python

I am getting the following error:

error: Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat)

I have already added the below lines to my Path:

C:\Program Files\Python 3.5\Scripts\;

C:\Program Files\Python 3.5\;

C:\Windows\System32;

C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC;

C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC

My system configurations are: 64bit windows 7 

1 Answer

0 votes
by (108k points)

Kindly be informed that you need to use the binary-only option for pip. Like, for mysqlclient, use the below command:

pip install --only-binary :all: mysqlclient

There are thousands of packages that don't generate a build for every single release which forces your Python pip to compile from the source. If you want to use the latest pre-compiled binary version, then use --only-binary :all: to allow pip to use an older binary version.

Browse Categories

...