I'm trying to pip install python library in anaconda notebook this is the documentation of the library
this is the last part of the error im getting
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
What I tried so far
1- uninstall and install python again
2- install all the packages from Microsoft visual studio
3- force upgrade setuptools
4- install the library from binary windows as whl file, but still getting the same error
5- try it in anaconda
Any solution for this error?? I'm using python 3.10.4 and 64X windows
Related
I installed Kivy successfully. But got error when run a program which is the module "Jnius" is not found.
For Jnius, I installed Cython, jdk, jre and add the path variables. Then got error to install the visual studio for C++.
While installing the Visual studio, the installing window get closed automatically. Then, I choose another option to install Microsoft Visual C++ Compiler for Python 2.7. Installation is successfull.
But again got error:
I ran into something like something like that today when i tried to install a package in pip command and the when i tried to install it binary it worked:
pip install --only-binary :all: jnius
you can try this and see if it's any help
I have problem with PIP 3.8
C:\Users\iivoo\PycharmProjects\TEST\venv\Scripts>pip install auto-py-to-exe
Collecting auto-py-to-exe...
distutils.errors.DistutilsError: Setup script exited with error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\iivoo\AppData\Local\Temp\pip-install-gf4x4k83\gevent\
I don't know what is problem i have: latest visual studio c++ building tools, python 3.8, pip 3.8, latest pyinstaller, windows 10
Pls help me thank you!
Edit: Sorry bad english!
I will try to give you a short list of reasons for this failure.
Auto Py To Exe uses (is based on) PyInstaller
PyInstaller has no support for Python 3.8
So, Auto Py To Exe doesn't work with Python 3.8.x but it does for Python : Python >= 2.7 ( including 3.7 🎉 ) Read here
PyInstaller is not supported on Python 3.8 yet. This solution works:
pip uninstall pyinstaller
pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip
pip install -U gevent==1.5a3
pip install -U auto-py-to-exe
Unable to install annoy package for Python 3.6 on Windows 10.
Both of the commands:
pip install annoy
conda install python-annoy // fails even after adding conda-forge channel
fail.
Error :
fatal error LNK1158: cannot run ‘rc.exe’
The error got fixed by setting PATH
C:\Program Files (x86)\Windows Kits\8.1\bin\x64
and running
vcvarsall.bat
as mentioned in the post:
Visual Studio can't build due to rc.exe
Windows 10 64bit
I installed traitsui successfully by pip in python3.52
Qt4 must be installed to display GUI on windows, But the highest version of python Qt4 support is python3.4
So, I install python3.4, when I try to install traits by pip
I got error message:
error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat)
I search the error message, get some results, But none of them solve the problem, So I install mingw
use pip to install traits again, get another error
collect2.exe: error: ld returned 1 exit status
error: command 'D:\\Program Files\\mingw-w64\\x86_64-5.3.0-win32-seh-rt_v4-rev0\\mingw64\\bin\\gcc.exe' failed with exit status 1
Is there a way to install traits on windows in python 3.4?
You can circumvent the problem of the error with Visual Studio C++ by installing a precompiled version of the package in form of a wheel. You can find wheel packages for most of the common modules here.
Download the file traits-4.6.0.dev0-cp34-cp34m-win32.whl (cp34 indicates Python 3.4, win32 that your Python is 32bit) and install it using the command line:
pip install C:\whereveryourfileis\traits-4.6.0.dev0-cp34-cp34m-win32.whl
Make sure that pip is linked to your Python 3.4 pip. If you are unsure, you can run the pip.exe directly by changing your directory in the command line (cd C:\Python34\Scripts) and running
pip.exe install C:\whereveryourfileis\traits-4.6.0.dev0-cp34-cp34m-win32.whl
Edit: Did you consider using Qt5?
I need to create table in a Word document through Python 3.4. For that, I am trying to install python-docx in Windows. If I use pip install python-docx I am getting the following error:
vcvarsall.bat error
So I installed Visual Studio and then tried to install it and I am still getting the following :
error: Setup script exited with error: command '"C:\Program Files (x86)\Microsoft Visual
Studio 10.0\VC\BIN\cl.exe"' failed with exit status 2
This is a problem with the lxml install. If you install lxml separately, using a Windows binary package, then reinstall python-docx, this error should go away.
You can find a binary lxml package here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml
I had the same issue. I was not able to install the lxml wheel for 64 machine because python falsely identifies my computer as 32. Ultimately installed the 32 and then it installed python-docx successfully.
FYI: I would have added this to comments but I don’t have the 50 required reputation to do so.
Download the py-docx module from the official website: https://pypi.python.org/pypi/python-docx
Unzip it
Open the command prompt and change your directory to the unzipped file. There a file named setup.py will be present.
Type the following code in the command prompt window.
setup.py install
The docx module is installed.
In cas somebody is still struggling with this topic in version 3.7:
https://visualstudio.microsoft.com/pl/downloads/
Scroll down and install: Build Tools for Visual Studio 2017
This worked fro me:
pip uninstall docx
pip uninstall lxml
pip install lxml
pip install python-docx
following this git-hub discussion
Or, just download the .whl file from http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml as #scanny mentioned, then use pip to install it:
CMD environment:
C:\Python27\Scripts>pip install C:\Python27\Scripts\python_docx-0.8.10-py2.py3-none-any.whl