Can't install traits on windows, python - python

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?

Related

error trying to install python library in anaconda

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

How to fix" ERROR: Failed building wheel for fa2"? [duplicate]

I am on a windows 10 machine and recently moved from python 2.7 to 3.5. When trying to install lxml through pip, it stops and throws this error message-
building 'lxml.etree' 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 have a working copy of VS 2015 installed. When I try to install the visual cpp tools through that link, it says that Microsoft Visual Studio 2015 is already installed on the machine. I also tried installing visual studio c++ 2015 redistributables, both 64 and 32 bit versions, but both of them say that there's another version of the product already installed.
typing set in the command prompt includes this -
VS140COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\
Which means that the path is set.
This is probably the only resource I could find on SO, but the answer suggests rolling back to Python 3.4.3 from 3.5. Has anybody resolved problems of this kind?
Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat)
EDIT: I managed to install it using the precompiled binary (Thanks Paul), but I would still like to know what's causing this.
Have you checked that when you installed Visual Studio, you installed the C++ compiler? It seems like a silly question, but this is the mistake I made. Check by going into the setup for visual studio (Programs and features: Modify "Visual Studio 2015"), then under Programming Languages->VC++, make sure it's ticked.
Run pip install wheel
Download lxml from http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml, if your python version is 3.5 , download lxml-3.6.4-cp35-cp35m-win32.whl.
Run python -m pip install lxml-3.6.4-cp35-cp35m-win32.whl
As an update to the answer from #davidsheldon above, if you want to use Visual Studio Build Tools 2017 instead of 2015, it will work.
I found that the default install of the build tools stand alone was not enough, however, I added `VC++ 2015.3 ... toolset for desktop (x86,x64) and then python was happy:
I've found another solution to get through this:
Because I use anaconda python, so I use this code:
conda install -c conda-forge scrapy
I have same question with you! I found a way no need install vs2015,maybe,you just haven't install twisted.http://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted .download twisted --version(Twisted‑17.5.0‑cp36‑cp36m‑win_amd64.whl)(maybe win_amd32.whl if 64didn't work),and run : pip PATH + filename
pip install C:\Users\CR\Downloads\Twisted-17.5.0-cp36-cp36m-win_amd64.whl
pip install Scrapy
I just install successful! good luck for you!
my step to insatll scrapy:
1.pip install wheel
2.pip install lxml
3.pip install pyOpenSSL
4.pip install Twisted (fault->do like above)
5.install pywin32 form : https://sourceforge.net/projects/pywin32/files/pywin32/Build%20220/
6.pip Scrapy (succesful)
Had the same problem and noticed that I had installed the 32bit version in a 64bit machine. All I did was uninstall the wrong one and install the right version and it worked fine.
Easiest way to achieve this, can be automated as it doesn't require user input:
python -m pip install https://download.lfd.uci.edu/pythonlibs/archived/lxml-4.9.0-cp311-cp311-win_amd64.whl
This will install the 64-bit version on your machine.
First:
pip install wheel
Second: go to http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml
and download proper wheel.
pip install the file you downloaded (.whl).

Installing jnius using pip

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

Error downloading pybluez on windows 10 with python 3.7 (64-bit)

I was attempting to download the python module one windows 10 pybluez (using the cmd pip install pybluez, when I had this error:
Collecting pybluez
Using cached https://files.pythonhosted.org/packages/c1/98/3149481d508bee174335be6725880f00d297afebe75c15e917af8f6fe169/PyBluez-0.22.zip
Complete output from command python setup.py egg_info:
Could not find the Windows Platform SDK
Command "python setup.py egg_info" failed with error code 1 in C:\Users\hartenc\AppData\Local\Temp\pip-install-r9kn6698\pybluez\
After extensive research, I was still unable to figure out why it wasn't working, so any help would be very beneficial. BTW I am using python 3.7. Thanks!
First of all make sure that the location you are looking for is not hidden. In my case I had pip installed but the python directory wasn't showing up. Then make sure you have windows 10 SDK installed. You should have 19.0.3 v of pip in the python directory.
If not then check: https://datatofish.com/upgrade-pip/
Once you have correct version of pip, launch powershell/command prompt and type in:
pip install PyBluez-win10.

XMLSEC installation error, Windows-7

Im trying to install xmlsec (with pip) but it is throwing: error: pkg-config is not installed. Im using Python3.6 on windows 7.
Thanks in advance for any suggestion.
Xmlsec has some issues with windows but as with python 3.6 and below the problem is solved. Use this link to download the wheel file for your python version https://github.com/mehcode/python-xmlsec/releases
Install the wheel file using
pip install <wheel_file_name>
As with Python 3.7, the only way out is to install xmlsec on a Linux machine as it is not yet supported on Windows.
This seems to be a problem on Windows #Jcc.Sanabria on Windows. Where as Linux & MAC are seems to be working for xmlsec.
Since I had gone through this situations for around weeks now.
Going through official Document
here I didn't find any instruction on "How to install this on Windows?"
To answer your question :
Resolve your exception related with pkgconfig you can use this link on Windows.
But then it will also ask you to install Visual C++ (>=ver. 14.0) but after installing this too.
You will face exception like this one :
"cl : Command line error D8021 : invalid numeric argument '/Wno-error=declaration-after-statement'
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2"
Which I didn't find any resolution till now. :(
But to use xmlsec and python on Windows working you need to take support from Cygwin. Where you can install all related packages from Cygwin Packages list for python and xmlsec dependancy. Following are the name & version of some packages :
gettext-devel(0.19.8.1-2),libglib2.0-devel(2.50.3-1),libxml2-devel(2.9.4-2),libxmlsec1-devel(1.2.24-1),libxslt-devel(1.1.29-1)
Further dependency can be checked on this link

Categories

Resources