python-poppler-qt5 install error on win7 - python-3.x

Direct installation of no, the named sipdistutils module python-poppler-qt5 problem, so I found a place on the Internet from the python-poppler-qt5 folder, there is a mistake in the image above
My environment: python3.4 pyqt5.4
I want to use pyqt5 to make a PDF reader.

You must also install the poppler-qt5 library. Python-poppler-qt5 is
only the python binding for the library.
See https://sourceforge.net/projects/poppler-win32/

Related

ModuleNotFoundError: No module named '<module.name>' - Installation error

I am building a desktop app using Python and PySimpleGUI. So far, everything works just fine. Whilst I was working at the project, I realized I need to find a way to get the duration of some mp3 files and to display it in a certain way. I discovered mutagen module that is supposed to help me in this sense, I installed, and here the problem arise:
It throws me ModuleNotFoundError: No module named 'mutagen'.
Seeing this, I started to look for the problem, but I couldn't not understand why my interpretor did not find the module even though I Installed it CORRECTLY. (as PyCharm told me)
I have tried the following:
I am using a local virtual environment that has installed the dependecies for the project(and some extra) and I uninstalled and installed the package 3-4 times
I deleted the local virtual environment and I created another one. I installed the packages again and same issue.
I installed a random module (scipy) and I tried to import it somewhere in the project and it thrown me same error, but this time for scipy module
My guess is that I did not configured properly my interpreter, but to be honest, I have no idea what I am doing wrong, because I followed the same steps I've been using for creating a venv with its according interpreter and for other projects, it worked just fine.
Further details:
Using python3.9 base .exe
I installed the packages in two ways: one using the pycharm IDE, and one by running pip3 install mutagen
You may be using a different pip that is not the one that affects the Python you are using. Instead of using
pip install mutagen
Consider using pip as a module of the Python you are using:
python -m pip install mutagen
This way you'll be sure you are working on the same Python.
If you want to continue using plain pip, try which python and which pip to make sure they are referencing the same environment.

PyQt5 stubs files

I've just started a PyQt5 project that is currently running in a virtualenv.
PyQt5 was installed using a classic pip install pyqt5.
I want to type check my application using mypy.
But when I run it, I get an error telling me that there are no stubs file for PyQt5.
myapp/__main__.py:3: error: No library stub file for module 'PyQt5.QtWidgets
I've checked the site-package of my virtualenv, and indeed, there aren't any .pyi file in it.
Checking the documentation, I see that if compiled, stub files can be generated (and could at least exists beginning with PyQt5.6, I'm using 5.10).
Is there a way to obtain those file without the need to manually compile the library ?
I had the same problem with PyQt5. So I decided to put up PyQt5-stubs which contains the stub files for the main PyQt5 modules.
You can install it with pip:
$ pip install pyqt5-stubs
Another solution for you would be to change to Qt for Python (PySide2). They provide proper type annotations.
Not currently.
PEP 561, which specifies how packages should indicate they supply type information, was recently accepted. (Full disclosure, I am the author).
PyQt5 will need to become compliant with the PEP, and then as long as you are using mypy >=0.600, everything should work as expected.

ModuleNotFoundError when installing packages

I've been having a problem with installing packages in PyCharm. This started happening a few months ago, but before that it was fine. I can install it from the cmd using pip, but when I try to import it into the IDE it gives this error:
ModuleNotFoundError: No module named '_winreg'
and isn't available for use. The package I'm trying to install right now is pygame, but it has had trouble with other ones. I tried to make sure I have winreg installed by using 'pip3 install winreg' in the cmd, but it gives error text saying, "Could not find a version that satisfies the requirement winreg." What am I doing wrong?
Also, if it helps, I'm using Windows and the latest version of PyCharm, as well as python 3. Thanks for the help, I've been looking for a while now.
I think one of your problems possibly is that you didn't add pygame in your project interpreter. (To add it go to File -> Settings -> Project Interpreter then click the green plus sign and search for pygame.) I don't know if this will work for winreg, but tell me if it does.
I can't find _winreg anywhere, I've searched winreg's file, and modules , there don't seems like any of _winreg. I think you probably want to import winreg, not _winreg.
And also, if you are using PyCharm's venv, you need to use the project's prompt to import,or project interpreter.
Could not find a version that satisfies the requirement sometime means your python's version is too new for the module to use.

Install python3-tk on pythonanywere

I tried to run a script using turtle module on pythonanywere.com, however, got stuck at an error that cannot find the module named "tkinter" and I need to install python3-tk package. I followed this tutorial installing new modules on pythonanywhere in attempt to install the package in Bash console on pythonanywere.com by running pip3.5 install --user package3-tk.
However, I got the error that "could not find the version that satisfies the requirement package3-tk".
I also tried to replace the package name with tkinter with no luck either.
You can't use the tkinter module from a server such as pythonanywhere. It needs to have a connection to a display and not just a browser window.
https://www.pythonanywhere.com/forums/topic/360/
Just learnt the lesson of finding answer by asking question in different way. My purpose is to use turtle module on pythonanywere, which is not possible as explained in the answer above. However, I just found out that pythonanywhere has an affiliate website that is free and supports turtle (www.trinker.io)

where can i find pyqt examples folder in Mac Os x?

I've installed pyqt on mac os x and it's up and running well. But i can't find the pyqt examples folder? May i know where this is located by default..
Another way to access them fast is via a github mirror:
PyQt5
https://github.com/baoboa/pyqt5/tree/master/examples/
PyQt4
https://github.com/ipatrol/pyqt4/tree/devel/PyQt-win-gpl-snapshot-4.8.4-69c456457274/examples
First you need to tell us how did you actually install PyQt. If you do it via MacPorts, which I recommend, your port name is qt4-mac. (You can check it via port list installed command.)
By default the installation doesn't include demos or examples. You can include both with:
sudo port install qt4-mac +demos +examples
This procedure is quite slow, up to several hours.
In /opt/local/share/qt4/ folder you'll find demos and examples, and in Applications/MacPorts/Qt4 will be qtdemo.

Resources