So, I have going over this back and forth, I tried several of the solutions on this forum, none worked.
I have pip3 installed, Python 3.4, Visual Studio 2015 on Windows 10.
Now whenever I run the installing for a new module manually or through pip3 I get the following error:
Say I use the cmdline as such:
pip3 install numpy
I get :
error: Unable to find vcvarsall.bat
----------------------------------------
Command "c:\users\ariel\appdata\local\programs\python\python35-32\python.exe -c
"import setuptools, tokenize;__file__='C:\\Users\\Ariel
\\AppData\\Local\\Temp\\pip-build-41rz6w_o\\numpy\\setup.py';
exec(compile(getattr(tokenize, 'open', open)(__file__).read()
.replace('\r\n', '\n'), __file__, 'exec'))" install --record
C:\Users\Ariel\AppData\Local\Temp\pip-vuq3ap0m-record\install-record.txt
--single-version-externally-managed --compile" failed with error code 1
in C:\Users\Ariel\AppData\Local\Temp\pip-build-41rz6w_o\numpy
If I download it and run it from the folder
setup.py install
I get
build_src
building py_modules sources
building library "npymath" sources
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
error: Unable to find vcvarsall.bat
Please help, considering to just use linux with python... less issues
This is based on #Jim answers in the comment section, basically make sure that you have the C++ compiler and windows SDK installed!
My problem was that when I installed Visual Studio, I did not select the windows SDK.
Related
I am trying to do some audio work in python, on my work computer. Getting IT approval to install anything is a laborious process, so I'm looking for a work around.
Anyways, the long 'n short of it is that when I run pip install webrtcvad, it fails, and tells me I need visual C++ 14. I have 2015, but apparently I need that specific version.
Is there anywhere I can download that package pre-built/compiled? I've been looking for the wheel file, but only found linux ones (I think, does that even matter? I'm on windows 10):
https://www.piwheels.hostedpi.com/simple/webrtcvad/
And I don't really know where to put one if it works, in any case. Traceback included for no real reason, just because I felt I should.
----------------------------------------
Failed building wheel for webrtcvad
Running setup.py clean for webrtcvad
Failed to build webrtcvad
Installing collected packages: webrtcvad
Running setup.py install for webrtcvad ... error
Complete output from command C:\Users\ylwaller\AppData\Local\Continuum\anaconda2\envs\sg2\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\ylwaller\\AppData\\Local\\Temp\\pip-install-wx00j30u\\webrtcvad\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\ylwaller\AppData\Local\Temp\pip-record-0f_keevu\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
copying webrtcvad.py -> build\lib.win-amd64-3.6
running build_ext
building '_webrtcvad' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
I found this (Works for Windows):
pip install https://github.com/respeaker/respeaker_python_library/releases/download/v0.4.1/webrtcvad-2.0.9.dev0-cp27-cp27m-win32.whl
From: https://github.com/respeaker/respeaker_python_library
Hope its of any help.
I had similar issue when installing the requirements.txt file in Pycharm IDE as part of a project. It was actually the issue with C++ compiler in my PC with windows 10. You can get the required build package from link https://visualstudio.microsoft.com/visual-cpp-build-tools/
Select only the C++ build package and perform installation. This is a 1.7Gb file and takes some time to install. Once installed, it will prompt to restart your system and the installation will work fine for 'webrtcvad'
I am trying to install the Python module simplecrypto on a Windows machine. To do this I run the following:
C:\Python36\Scripts>pip install simplecrypto
However, upon running this partway through the installation process I receive the following error:
...
Crypto.PublicKey._fastmath.
building 'Crypto.Random.OSRNG.winrandom' extension
error: [WinError 3] The system cannot find the path specified: 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\PlatformSDK\\lib'
----------------------------------------
Command "c:\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\EDM-P\\AppData\\Local\\Temp\\pip-build-teqxfnwt\\PyCrypto\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\EDM-P\AppData\Local\Temp\pip-nrmsip8r-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\EDM-P\AppData\Local\Temp\pip-build-teqxfnwt\PyCrypto\
Why is this the case?
An error occurs when it attempts to install PyCrypto, which is a requirement of the package. The GitHub README mentions:
If the dependency installation fail on Windows, you may want to use a
prebuilt installer. If you wish to compile it I suggest using the
Mingw tools as indicated here.
Install it from here and then compile by
install MinGW with C++ Compiler option checked add C:\MinGW\bin to
your PATH in PYTHONPATH\Lib\distutils, create a file distutils.cfg and
add these lines:
[build] compiler=mingw32
I tried to install Twisted using pip
pip3 install Twisted
However I got the following errors
running build_ext
building 'twisted.test.raiser' extension
error: [WinError 3] The system cannot find the path specified: 'C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v8.1\\lib'
----------------------------------------
Command "c:\python361\python.exe -u -c "import setuptools, tokenize;__file__='C:
\\Users\\User\\AppData\\Local\\Temp\\pip-build-32gww8wb\\twisted\\setup.py';f=ge
tattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.cl
ose();exec(compile(code, __file__, 'exec'))" install --record C:\Users\User\AppD
ata\Local\Temp\pip-f8823kmo-record\install-record.txt --single-version-externall
y-managed --compile" failed with error code 1 in C:\Users\User\AppData\Local\Tem
p\pip-build-32gww8wb\twisted\
I checked the directory in my computer, I indeed do not have the lib folder in path C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v8.1. I have downloaded Visual Studio 2015 Community but it does not solve the problem.
Is there any thing I need to set after downloading Visual Studio ?
How to solve this problem ?
Updated:
I want to compile this program https://github.com/KDE/kajongg which require me to install Twisted.
I was trying to install mysql-python using pip
I'm getting the following error:
error: Unable to find vcvarsall.bat
----------------------------------------
Failed building wheel for mysql-python
...
...
running build_ext
building '_mysql' extension
error: Unable to find vcvarsall.bat
----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools,
tokenize;__file__='c:\\users\\hp\\appdata\\local\\temp\\pip-build-
jy5yhb\\mysql-python\\setup.py';exec(compile(getattr(tokenize, 'open', open)
(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record
c:\users\hp\appdata\local\temp\pip-jditig-record\install-record.txt --single-
version-externally-managed --compile" failed with error code 1 in
c:\users\hp\appdata\local\temp\pip-build-jy5yhb\mysql-python\
Background works did:
Installed MySQL from official website(link)
Installed SQLite3
Installed Visual C++ Redistributable 2008, 2010, 2013, 2015
Installed C++ Compiler for python (latest)
I have tried all the answers that already exist in Stack Overflow and other Websites, nothing helped.
Context:
I'm trying to run a Django server in my laptop, for which I need mysql-python.
(OS: Windows 10)
I am getting following error in installing Cassandra driver for python.
Command "c:\python33\python.exe -u -c "import setuptools, tokenize;__file__='c:\
\users\\vmasama\\appdata\\local\\temp\\pip-build-we10p7\\cassandra-driver\\setup
.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n
', '\n'), __file__, 'exec'))" install --record c:\users\vmasama\appdata\local\te
mp\pip-olh8j5-record\install-record.txt --single-version-externally-managed --co
mpile" failed with error code 1 in c:\users\vmasama\appdata\local\temp\pip-build
-we10p7\cassandra-driver\
Any one have any idea about this ? What am i missing ?
Following errors were also there when i run pip install cassandra-driver
Failed building wheel for cassandra-driver
Failed cleaning build dir
for cassandra-driver
python version : 3.3
I tried it in an environment missing compiler paths and observed something similar. I think it's a problem in setuptools error handling when it doesn't find what it's expecting. The easiest way I've found is to use the VS Command Prompt shortcut installed with Visual Studio:
Perhaps the easiest way to do this is to run the build/install from a Visual Studio Command Prompt (a shortcut installed with Visual Studio that sources the appropriate environment and presents a shell).
http://datastax.github.io/python-driver/installation.html#windows-installation-notes