Python 3.10 - ModuleNotFoundError: No module named 'win32.win32ui' - python-3.x

I just updated my python from 3.7 to 3.10 and now there are import error's.
While I just needed for import win32gui turn into import win32.win32gui as suggested here. There seems no other syntax for import win32ui, after some research I found this github report that has been closed with:
That's very helpful, thanks, and I can reproduce this in visual studio
I didn't consider that an exception was being caught and ignored. Turns out we aren't holding the GIL when we call back into Python -
I've no idea why this is different in 3.9 vs other versions, but the
fix is simple and is safe in all versions.
While there is suggested to comment out a line in a file named win32control which I apperantly dont have or find. Neither it seems possible in my compiled files that looks like:
G Áàȉ x#;÷щ
Nor do I understand the wheel solution and what to do with it, since I am still a beginner with hobby experience in python programming.
Update I just found this Q&A but not sure if it is related.

While it helped me on my other device to just reinstall my older python version, as stated in the comment section:
#CristiFati thanks for your reply. Since I installed my earlier
version of 3.7.2 again pywin works fine even if I run the code with
IDLE Shell 3.10.
This wasnt possible on my new device, but the Running as a Windows Service helped me out this time.
Manually copy pythonservice.exe from the site-packages/win32 directory
to the same place as these DLLs.

Related

Python Turtle Crashes MacOS

Yes, I know there are already questions with a similar title, but I couldn't find a solution.
My problem is that whenever I use turtle, it crashes the entire computer. A video is attached here. This works with any turtle command, not just the one shown. It also crashes when I use any interpreter, not just the terminal.
I am running MacOS Mojave 10.14.6, with python 3.7.
Thank you for any help you may have.

Visual Studio Code, pylint complaining about "Unable to import XXX"

I am using Visual Studio Code to work on a large python project with many modules.
My settings.json looks like this:
{
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.autoComplete.extraPaths": [
"C:/Users/.../repos/platform",
],
"python.linting.pylintPath": "pylint"
}
After that inside the code. I am getting a ton of error on all import modules which are inside the platform-folder.
I have python3 installed with python extensions and pylint installed as well.
I have searched for over an another and tried many different suggestions but none has worked for me so far.
The Current Problem you are facing is not regarding code formatting (by pylint).
you would rather want to choose the interpreter you want to have Intellisense for.
they are provided in docs as followed. link.
Hope this helps.
If it's TL;DR for you.
just press F1 on vscode window and type Python:Select you will get right prompts.
The answer above helped me out, thanks #srinath samala! Sharing why this worked for me in case it helps someone else.
I've been running Python on Windows 10 for a while, and months later installed Anaconda, which I don't think I did quite according to best practices. Windows machines can be annoying about proper PATH config etc...I probably need to uninstall and reinstall anaconda?
In any case, using the F1 key and Python:Select to point VS code toward which Python.exe file was being used made the difference here. Apparently using pip install in a windows bash session might make those packages available for one environment v the other? I'm sure this has something to do with my own (currently janky) directory structure, but VS code defaulted to Python's original home, and I got the import error. By selecting anaconda's version it found the package. Hope this helps someone else!

OpenCV 3.x Documentation in PyCharm

I've compile OCV 3.4 on my Mac. Everything runs fine, PyCharm works, QT5 bindings are fine.
I have one problem: Don't know how to add the documentation for OCV in PyCharm.
I know it's under ExternalDocumentation but how do I specify the right path???
I have the generate doc files on my HD (OpenCV/doc/html and OpenCV/doc/javadoc)
I have installed opencv-python via pip install opencv-python (see https://pypi.org/project/opencv-python/ for more details) and now I can see all the docs with Ctrl+Q shortcut. The only problem, I was not able to get a nice formatting:
Help on openCV function in the Documentation tool window
Still it simplifies things a lot comparing with the manual installation I had before.

Can't access PyQt functions in PyCharm

I've recently installed Pycharm and PyQt to start application development, but I can't seem to access the PyQt functions in my projects. The same code works if I open an example of PyQt, but if I paste it in my project, I get these squiggly underlines and an error upon compile.
The issue is with the pycharm skeleton file generator, encounters issues with some pyqt files, there is no pattern as to why this happens. I have had similar issue with pyqt 5.3 and the pycharm 3.4.1. I and several others spent hours on the issue, browsing the web for clues and trying everything suggested to no avail.
We eventually found a post on StackOverflow that indicated a solution. In our case applying it was quite simple: we did not observe this problem with pyqt 5.2 therefore we copied the skeleton files from that version into the 5.3 skeletons folder. The details of how to do this are available in a comment that I posted on the pycharm bug tracking site: PyCharm auto completion doesn't work for PyQt 5.3. The issue is discussed in other ticket I just found, which might provide an actual fix instead of just a temporary patch: Unresolved reference in PyQt for QtGui module.
Late , but after none of above methods not work I closed pycharm and restarted pyCharm by restarter.exe in this path:C:\Users\<user-name>\.PyCharm2016.2\system\restart , then reopened pycharm. In my case it just worked :)

Matplotlib for Python 3 and Linux

I understand that Matplotlib has been ported to Python 3 (matplotlib-python-3-thanks-cape-town-group).
However, it seems that I can only find Windows executables.
The matplotlib-py3 page claims that it was merged into Matplotlib.
Does anybody knows where I can find Matplotlib 1.2 development branch most likely to work on Linux. Does anybody successfully use it with Python 3?
As #ThomasK mentioned, the git master branch is the place to get the current Python3 compatible version of matplotlib, and it will be where v1.2 is cut from. If there are any problems that come up, please file them as bugs.
Just a heads up that there will soon be a bug-fix only v1.1.1 release, which will still not be Py3k compatible, so when you hear about it, please ignore it as far as Python3 is concerned.
I know this is a pretty old question, but I'm currently able to use matplotlib (1.2) with python3 using pip:
pip-python3 install matplotlib
worked for me, using python 3.3.

Resources