3

Like many before me I don´t succeed in installing a few Python packages (mysql, pycld2, etc.) on Windows. I have a Windows 8 machine, 64-bit, and Python 3.4. At first I got the well-known error "can´t find vcvarsall.bat - install VS C++ 10.0". This I tried to solve by installing MinGW and use that as compiler. This did not work. Then finally I found an installer for this VS C++ 10.0 here http://microsoft-visual-cpp-express.soft32.com/free-download/. This doesn´t work too good either. Now it seems to find the vcvarsall file but instead gives me a couple of new errors

nclude -IC:\Python34\include /Tc_mysql.c /Fobuild\temp.win32-3.4\Release\_mysql.
obj /Zl_mysql.c_mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h':
No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\BIN\\cl.exe' failed with exit status 2

And:

pycldmodule.cc
bindings\pycldmodule.cc(16) : fatal error C1083: Cannot open include file: '
strings.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\BIN\\cl.exe' failed with exit status 2

So now it doesn´t find strings.h and config-win.h and I´m too new to these sorts of problems to know what to look for. Anyone knows what I should do?

The thing is that I could just not use Windows and go over to Ubuntu as, for what I´ve understood, works painlessly with python. However, I have to use the win32com package which doesn´t exist on Ubuntu (have I understood that right?). If I can´t solve these installing hassles on Windows, would a solution be to use a Windows virtual machine for the win32com part and do the rest on a host Ubuntu (or the other way around)? Would there be anyway to communicate between the two in that case? I.e. sending strings or arrays of data.

user2069136
  • 281
  • 3
  • 15

5 Answers5

3

I have faced the exact same issues for Python 2.7 on 64 bit Windows trying to install pycld2.

Tried many methods like installing VS express 2008, MingW, etc and it just doesnt work.

What saved me is this link: https://github.com/aboSamoor/polyglot/issues/11

The proposed solution is to download the binaries from http://www.lfd.uci.edu/~gohlke/pythonlibs/ and pip install .whl

The cpXX denotes the version of python. So in my case, I used cp27.

Hope it helps

Horo
  • 53
  • 5
2

I would recommend installing Ubuntu (as a Ubuntu user), you can dual-boot. However, that isn't an answer.

MySQLClient (the fork for Python3) is available a precompiled binary from here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient

Try to find precompiled binaries for simplicity sake. As far as troubleshooting the install goes, I've tried the recommend VC Studio 9.0 on fresh installs and it cannot find stdint.h (which, like yours, suggests it's more than broken).

Alex Huszagh
  • 13,272
  • 3
  • 39
  • 67
  • Microsoft's compiler implements C89, so there's no C99 stdint.h. And strings.h is a POSIX/Unix header. – Eryk Sun Jun 10 '15 at 00:30
  • 1
    That one I already got actually. But I did found pycld2 down at the bottom which I missed last time visiting the site! Hopefully I´ll get somewhere down the road now. – user2069136 Jun 10 '15 at 10:09
  • @Alexander, would it be possible to use Ubuntu as host, Windows in a virtual machine and have them interconnect/communicate with each other? I.e. send data between the two. Would be nice to, without restarting the computer all the time (as would be necessary with dual-boot), be able to program using the win32com package on the virtual machine and at the same time having all the benefits of Ubuntu, i.e. doing all other programming there. – user2069136 Jun 10 '15 at 10:18
  • 1
    @user2069136, you can use sockets, e.g. see [socketserver](https://docs.python.org/3/library/socketserver.html). – Eryk Sun Jun 10 '15 at 13:54
1

You could try http://www.activestate.com/activepython/downloads for Windows. I t includes compiled binaries, avoiding the need for a C complier.

Kim Ryan
  • 515
  • 1
  • 3
  • 11
  • Good suggestion, just a heads up, there is no precompiled binary for pycld2 on pypm repository. – Alex Huszagh Jun 10 '15 at 00:15
  • Thanks for the tip! I´ll see what it can do even though I´m not really sure of what it is. Standard Python but some special kind at the same time? – user2069136 Jun 10 '15 at 10:13
0

I grew frustrated with trying to get python and other packages to compile/play nicely on Windows as well. Switching over to Ubuntu was a breath of fresh air, for sure.

The win32com package is made specifically for Windows hosts, so that could not longer be used, but there are other ways to achieve the same thing in Ubuntu.

Are you trying to target Windows specifically? What are you using win32com for?

Rick Sullivan
  • 178
  • 1
  • 7
0

Looks like you're missing MySQL dev package. Another StackOverflow question has the details. But if I were you, I'd go the route Alexander Huszagh recommended and get my precompiled binaries from http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient

Community
  • 1
  • 1
kichik
  • 33,220
  • 7
  • 94
  • 114