unable to install pyqt4 with multiple methods - python

I've been having a ton of issues in general trying to install packages on python 3 on windows. I don't know if any issues are related or not, I'm just going to try to provide as much detail to these issues as I can.
It's not just PYQT, but a couple packages are giving me issues with installing. I have a python 3.5.1 virtual environment, and when I try to install PYQT4 it gives me the error (using pip, pip3, with and without --pre):
Could not find a version that satisfies the requirement pyqt4 (from versions: )
No matching distribution found for pyqt4
This isn't the only package that has given me this exact same error, but I can't recall atm what other packages gave me issues. (Another issue I often get with other packages is error: Unable to find vcvarsall.bat. I've been through all the questions regarding that error, installing visual c fails for me).
So I decided to try to download the zip and follow this guide: http://pyqt.sourceforge.net/Docs/PyQt4/installation.html , which has me following this guide to install SIP as a requirement: http://pyqt.sourceforge.net/Docs/sip4/installation.html#downloading .
So now I'm having more problems. Part of the installation process for SIP requires using a makefile. So I downloaded make from cygwin. I run python configure.py to generate the makefile (in the proper virtualenv), and I run make, but make never ends. It keeps reading this over and over again until I kill powershell or cmd:
cd sipgen
/usr/bin/make
make[453]: Entering directory '/cygdrive/c/Users/<username>/.virtualenvs/<envname>/sip-4.17'
That directory is the location of the makefile. I'm completely inexperienced with make, so any help would be appreciated. All of these problems are while using Python 3. My python 2 virtual environments are able to install most packages fine.
Edit: My mistake, in this case it's giving the same pip error with python 2 and 3.

Related

Trouble installing python packages to target folder (ERROR: Can not combine '--user' and '--target')

I am going through "Automate the Boring Stuff" and I am using Mu as a text editor. I am trying to install a particular package called pyperclip.
Since Mu has its own Python environment, I am trying to install pyperclip into its /pkgs folder. I encounter the following error:
PS C:\Users\MYUSERNAME\AppData\Local\Mu\pkgs> pip install pyperclip --target "C:\Program Files\Mu\pkgs"
ERROR: Can not combine '--user' and '--target'
I have looked around on GitHub and previous posts on learnpython and I have not found similar troubles.
My major confusion is that it says I cannot combine --user but I did not type --user.
I have a feeling the solution is elementary, but I am learning python and how to work with terminals, so I would appreciate someone teaching me what I am doing wrong.
I found this question, whose solution is to reinstall Python from the website, not from the Microsoft app store, but I am pretty sure I downloaed Python from the website. Should I re-download or would that cause more complication?

How can PIP be installed on Python version 2.5.4 running in Windows 95 environment?

Context
I'm constrained to using Python 2.5.4 in a Windows 95 environment and need PIP. Those running versions earlier than 2.7.9 (after which PIP came pre-installed) are supposedly able to install PIP by following the instructions in this link.
Obstacle
Trouble is the file, get-pip.py, referenced in the previous link is written with python 3 syntax, so at runtime it throws a host of SyntaxErrors in the 2.5.4 interpreter.
What I've already tried
I've managed to refactor get-pip.py, and it runs successfully up until it starts throwing more SyntaxErrors at the point where it executes the code derived from the binary blob, which I was unable to refactor.
Based on a suggestion in this post, I've tried to install other libraries, including the PIP package manager, from their unzipped tar files (link to compatible PIP tar) via the included Setup.py script. In PIP's case, this throws ImportError: No module named setuptools. My attempt to remedy this by installing the compatible version of setuptools per the instructions (link) for Windows failed because of a dependency with socket.py. And so on, and so forth.
Conclusion
Is PIP even possible in Windows 95 with Python 2.5.4? If someone were to help me stop hoping it were possible, I'd let it go and move on; but as it is I've spent 19 solid hours hoping to solve this puzzle with little to show for it. Please help!

Setuptools error when trying to install a package

I’m completely new to Python and I want to install the package py-webrtcvad in Windows 7, but I'm stuck at the error ImportError: No module named 'pip.utils.setuptools_build'. There is an answer to this problem in stackoverflow which seems to solve the problem for others, but it doesn't work for me.
Here’s a summary of what I’ve done and tried so far:
Installed Python 3.5 and set up the Windows path environment so
that it works from any directory.
Installed pip for Python.
Tried to install the package with python -m pip install webrtcvad,
but it failed, returning the error Unable to find vcvarsall.bat.
I found a blog that deals with the vcvarsall.bat
problem: blogs.msdn.microsoft.com/pythonengineering/2016/04/11/unable-to-find-vcvarsall-bat. Following the directions of that blog:
First I just installed Visual C++ Build Tools 2015 and tried installing the package straight away (without updating setuptools), but I received a lot of error messages (which I didn’t write down).
I tried reinstalling setuptools, which I did following the directions in https://pypi.python.org/pypi/setuptools: I removed the version of setuptools that came with my Python installation (v20), and installed the latest version (v30). This time I got a different error message when trying to install py-webrtcvad: ImportError: No module named 'pip.utils.setuptools_build'.
Asked for assistance in the Python official chat. They made three
suggestions:
Updating pip with python -m pip install --upgrade pip. Didn’t
work. Again, the error ImportError: No module named 'pip.utils.setuptools_build'.
Reinstalling Visual C++ Build Tools 2015. No difference, same error
again.
Reinstalling Python itself. The Python installer offers three
choices: Repair, modify and uninstall.
Repair: Didn’t work. Same error.
Modify: Doesn’t look like it offers useful modifications for this.
Uninstall: Uninstalled and reinstalled. Still the same error.
I’m out of ideas. Can you help me?
Note: I imagine this should be doable in Windows 7 with Python 3.5. However, if it isn't I'm open to trying anything different. For example, installing a different version of Python would be no problem at all. I could also try installing Linux if that will solve the problem.
There was a bug in version 2.0.8 of webrtcvad that caused it to use the wrong flags when compiling for Windows: it was using -DWEBRTC_POSIX instead of -DWIN32. This might have been the source of the "lot of error messages" you got during one of your early attempts.
The fixed version has been pushed to pypi as version 2.0.9. I've confirmed that pip install webrtcvad works correctly on Windows 10. I'm using a pretty fresh install of Python, so I would try it first without reinstalling setuptools.

Installing modules reliably in one location

I've been working with Python for a little while now but have come to absolutely detest installing new modules. It always seems to take me a full work day to install one additional module. This last happened with mpl_toolkits and now it is happening with gdal.
The main issue seems to be that easy_install/pip/get-app aren't saving a file in the correct location and so Python (I'm using Spyder) can't find it. How do I install a module in a location so that Python can find it?
I have been reading guides, articles, manuals and Stack Overflow articles all day now and I feel this needs a new question as I can't find an answer.
It is installing fine, it's just Python (and I) can't find it
It's not in the /lib/python2.7/site-packages folder, which seems to be the Python default, although half the modules that do work aren't in there when I list it
I installed using:
sudo apt-get install gdal-bin
I also tried with:
pip install gdal
but this fails with the error:
Command "python setup.py egg_info" failed with the error code 1 in /tmp/pip-build-NWJT2f/gdal/
I looked for the files using
dpkg -L gdal
and then added the file path this said into Spyder's preferences option for PYTHONPATH, but it still couldn't find it and so I'm guessing this is wrong.
I have read the official documentation of PYTHONPATH, but it's very short and doesn't really explain it at all.
I recommend trying anaconda or miniconda, which manage environments and install packages - it 'just works'.
https://www.continuum.io/downloads

Python 3.4 - Installing Kivy Error

I'm trying to install Kivy on Python 3.4 using the instructions here: https://kivy.org/docs/installation/installation-windows.html
I'm on the installing dependencies step, where it gives me this error: http://prntscr.com/a5rk5k
Initially I tried just going ahead to the last step (python -m pip install kivy) and it looked like it worked fine, but then I tried import kivy in a Visual Studio project and it said "Unable to resolve "kivy""
Any ideas anyone? Keep in mind, I had Python 3.5 installed (which kivy does not work with) before now and set to default, but I changed the path in the command prompt.
Something is not right with your kivy installation, use python -m pip list to check what packages are missing and (re)install them, one-by-one would be the best for debugging. And also you've pasted it wrong, so the kivy.deps.gstreamer was read as a separate comand and not a package for pip
For simple installing of kivy just follow the install docs or if you don't mind having another folder or reinstalling python for new kivy&python try KivyInstaller which hopefully makes the whole process beginnerproof. You enter what you need in the beginning and then wait.

Categories

Resources