I am using Python 2.7.3 and trying to install the package numpy on my windows machine but I am getting a Runtime error that says Broken toolchain: cannot link to a simple C program. I read the solution here but it was specific to Mac OS. I tried installing numpy with pip as well as the setup.py install option but both the methods give the same error.
I recently installed Visual Studio 2008 and Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1 (this is necessary as VS 2008 does not provide a 64 bit compiler) to remove the "vcvarsall.bat not found" error. Are these two error related or am I missing something in the process? Please help!
Also, after installing VS 2008, I have VS90COMNTOOLS in the system variable. What can be the problem for Broken toolchain error?
Related
The problem
I am trying to install a Python package called dedupe. It's available with pip install dedupe, but get the following error:
Running setup.py install for Levenshtein-search ... error
error: subprocess-exited-with-error
[...]
Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft
C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools
But I have MS C++ Build Tools installed (the latest version).
And the strange thing is: I once had a 32bit version of Python 3.8 on my PC, and here, dedupe was installed without problems (but then didn't process my data due to a so called MemoryError – a problem I ascribe to the 32bit version).
What I tried
Uninstalled all Python interpreters on the system
Un- and re-installed MS C++ Build Tools
Re-installed Python 3.10 64bit
created a venv-environment with that interpreter
updated setuptools
But still, the error persists.
I have looked for similar questions and tried their solutions:
How to install Visual C++ Build Tools: I have Build Tools installed (Workload "Desktop Development with C++)
Installing Visual Studio doesn't do the job for me, including the latest answer. And the weird thing: While I wasn't able to install misaka, too (the package discussed in this question), installing spacy was not a problem (while some other person had problems with that).
So?
Does anybody have an idea why my 64bit Python might not recognize Visual C++?
When I was compiling my python project using Nuitka, there came an error:
python36.lib(python36.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86'
I am using Windows 10 64bit, Nuitka 0.5.28.1 Python3.6 64 bit, Visual Studio 2017 Community and Python 3.6.3 |Anaconda custom (64-bit)|.
I want to build a x64 exe file.
I've searched Internet saying that something Configuration Properties, Target Machine. However, I don't have an VS project when using Nuitka, so I don't know where to config.
I just ran into this problem today.
I think it is because anaconda is probably compiled with a different C compiler. I just used the normal python (no anaconda) and pipenv to have environments.
I'm having an issue installing numpy on Windows 10 x64 with python 3.5.1. When I type pip install numpy, I get the error: unable to find vcvarsall.bat. I've also gotten this error from attempting to install other libraries.
From doing my research on the problem, I know it's related to the Visual C++ compiler for Python, or Visual Studio, as suggested in this answer and others: https://stackoverflow.com/a/10558328/1745715 I've installed both of these (Visual studio 2015, as it is my understanding that 2015 is what I want for python 3.5.1), and can verify that they have added values to my PATH. I've also rebooted the system since. No matter what I try, I still get the error when attempting to install numpy (and other packages) from pip. Could it be that I need a different version of Visual Studio for this version of Python?
I know there are many questions on SO involving similar situations, so before someone marks this a duplicate: I have read them all, and have not found any answer to work for me. Moreover, most of them do not relate to this environment (windows 10 x64, python 3.5.1). The nearest answer was one regarding Python 3.5 on Windows 10 x64 while installing numpy using pip, but the suggestion (to used a precompiled version of numpy and avoid the pip install) was unsatisfactory, as I have other libraries I have to install via pip that are also experiencing the same issues, so I need the compiler to work correctly.
I have been trying to install Scipy onto my Python 3.5 (32-bit) install on my Windows 7 machine using the pre-built binaries from:
http://www.lfd.uci.edu/~gohlke/pythonlibs
I have, in order, installed the following libraries
numpy‑1.10.1+mkl‑cp35‑none‑win32.whl
scipy‑0.16.1‑cp35‑none‑win32.whl
Then, when trying to use the installed packages I get the following erros
from scipy import sparse
< ... Complete error trace ommitted ... >
packages\scipy\sparse\csr.py", line 13, in <module>
from ._sparsetools import csr_tocsc, csr_tobsr, csr_count_blocks, \
ImportError: DLL load failed: The specified module could not be found.
However, if i follow the same process for Python 3.4 replacing the installers with:
numpy‑1.10.1+mkl‑cp35‑none‑win32.whl
scipy‑0.16.1‑cp35‑none‑win32.whl
Everything seems to work. Are there additional dependencies or install packages that I am missing for the Python 3.5 install?
Make sure you pay attention to this line from the link you provided:
Many binaries depend on NumPy-1.9+MKL and the Microsoft Visual C++
2008 (x64, x86, and SP1 for CPython 2.6 and 2.7), Visual C++ 2010
(x64, x86, for CPython 3.3 and 3.4), or the Visual C++ 2015 (x64 and
x86 for CPython 3.5) redistributable packages.
Download the corresponding Microsoft Visual C++ Redistributable Package which should be this one based on your description.
I had a similar problem, can't recall the exact issue, and I download the one for my system and it worked fine. Let me know otherwise.
Possibly helpful: trying to pip install scipy-0.18.0rc2-cp35-cp35m-win_amd64.whl (downloaded from http://www.lfd.uci.edu/~gohlke/pythonlibs/) on 64-bit windows 7 with Python 3.5 failed with a "file does not exist/not a valid wheel filename" error.
From various hints obtained from here and elsewhere I found that renaming the file to: scipy-0.16.1-cp35-none-win_amd64.whl allowed it to install.
Pull up the command window (search for it in the start button), then enter
pip install numpy
and
pip install scipy‑0.16.1‑cp35‑none‑win32.whl
then it should let you know in the command window if it was successfully downloaded, if you have python 3.5.
I had a question that turned out to be a duplicate of this one here:
ImportError: DLL load failed: when importing statsmodels
I actually solved this and other issues related to installing packages (such as statsmodels) by using Anaconda installer for Python 3.5.
Not sure what I'm doing wrong but when I run pycrypto-2.6.win-amd64-py3.3.exe I get Python 3.3 is required, which I have just installed before I tried to install the crypto. I should also note that I have VS 2013 installed, as I'm reading that I may need to compile the whole thing or something.
Anyway, as an option I have a Fedora installed on a Virtual Box, not sure how use it though but if it is "easier" on Fedora I can try to install it there.
I'm actively searching for a solution but am short on time and would like some help. Thanks.
You probably installed 32bit version of Python - install 64bit version.
pycrypto-2.6.win-amd64-py3.3.exe is binary package which means it's already compiled so you don't need compiler to install it. If compilation were needed you would have to have the same version of Visual C++ which was used to build Python itself; in case of the official Python 3.3 that's Visual C++ 2010 not 2013. See What version of Visual Studio and/or MinGW do I need to build extension modules for a given version of Python? question for more details.