How to fix: PyInstaller in MSYS2 MinGW 'Your platform is not yet supported' - python-3.x

I'm trying to package my GTK3+ Python 3 script using PyInstaller on Windows 10.
GTK3+ and the Python bindings are installed and working, using MSYS2 MinGW as per the GTK+ instructions.
In MSYS2 MinGW, when I type:
pip3 install pyinstaller
I get the error: Your platform is not yet supported. Please define constant PYDYLIB_NAMES for your platform.
So I attempted to install PyInstaller manually from Windows PowerShell by downloading and extracting the tar.gz file for PyInstaller and then running:
python3 setup.py install
But with that, I get "ModuleNotFoundError: No module named 'setuptools'".
How can I install PyInstaller in MinGW, for use on a GTK3+ Python3 script?

You can download setuptools from PyPI and install manually with python setup.py install. Then repeat what you have done.

With PyInstaller 3.6, you should no longer be getting the Your platform is not supported errors when trying to pip install it in MSYS2.

Related

import distutils.command.bdist_wininst as orig

Everything went well while I was trying to create a ros 2 package in Ubuntu 22.04 by following the ros2 documentation, however when I got to the colcon build step, it failed for python packages even though it works for cMake packages.
colcon build --packages-select mypkgpython
...
import distutils.command.bdist_wininst as orig
ModuleNotFoundError: No module named 'distutils.command.bdist_wininst'
knowing that my python version is:
python3 --version
Python 3.10.6
i have tried:
sudo apt-get install python3-distutils:
python3-distutils is already the newest version (3.10.6-1~22.04).
sudo apt-get install python3-apt:
python3-apt is already the newest version (2.4.0).
sudo apt install python3-colcon-common-extensions
python3-colcon-common-extensions is already the newest version(0.3.0-1)
how can i solve this problem?
i expected when i build my python package using
colcon build package
it will be successfully build, so i could work with
The bdist_wininst command was deprecated in Python 3.8 and you are using python 3.10
Its no more found in python3-distutils package .
use
bdist_wheel (wheel packages) instead
or
if you want to run your code as it is downgrade your python to < 3.8
The bdist_wininst format was deprecated in Python 3.8, and the documentation for this format has been removed in Python 3.9. The recommended way to distribute Python packages now is the Wheel format.
you can overcome this error by JUST updating the setuptools
pip install --upgrade setuptools
Note that: Setuptools version 58.2.0 is the last version that works with ROS 2 python packages without any warnings because it is the last version that supports the old installation method, "python setup.py install." This method has been deprecated and replaced by newer, standards-based tools, such as pip and ament.
pip install setuptools==58.2.0

How to install PyAudio via Virtual Environment in PyCharm

So I am using a venv (virtual environment) for one of my python projects and need to install PyAudio for it. I am using PyCharm for the venv.
When I try to install PyCharm usually it comes up with 'Command errored out with exit status: 1'
How can I install PyAudio into my venv properly (I know PyAudio needs to be installed differently I just don't know how to do it in the venv)
You can do this by
pip install pipwin
And then
pipwin install pyaudio
This installs the .whl package automatically
So I fixed my problem. I found the PyAudio file in my normal python (Python 3.9 64-bit) and transferred it to my venv (Python 3.8 64-bit) and now it works fine!

ERROR in install opencv in my python 3.6.6

I HAVE PYTHON 3.6.6 INSTALLED IN MY WINDOWS 7 PLATFORM BUT WHEN I TRIED TO INSTALL OPENCV PACKAGE IT SAYS REQUIREMENT ALREADY SATISFIED AND IF I TRY TO IMPORT CV2 IT SAYS NO MODULE .I'VE TRIED ALL POSSIBLE METHODS ON INTERNET WHAT SHOULD I DO
i tried to download opencv exe from sourceforge and copying cv2.pyd file and then pasting it in site packages
i tried pip install opencv_python-4.0.1-cp37-cp37m-win_amd64.whl
but nothing works
The error message says that you are asking PIP install a version of cv2 for 64-bit Python 2.7, and that installation is failing. So the installation is not happening because it's the wrong version. That might be because you don't have Python 2.7, or because you have a 32-bit processor, or both. Navigate to Python36\Scripts and issue the command pip install opencv_python. Then pip will find the appropriate file to download, and install it.

Is python 3.6 supported by pyinstaller or cxfreeze?

I want to create a standalone executable, I am using python 3.6 on 64 bit os. And while trying to install cx freeze I got this msg
no matching distrubtion found for pyinstaller
Same error with cxfreeze
3.6 is supported by both now. pip install pyinstaller should work
If you are by chance using an Anaconda environment you will have to conda install pip before you pip install pyinstaller

Installation of tkinter on python3

I'm using Fedora 21. Installed the python3-tkinter package using yum install python3-tkinter. The package gets stored in the /usr/lib64/python3.4 directory. Is there a way to use pip to install tkinter?
Have a virtualenv setup with python3. When I try to run my program within that virtualenv I get:
ImportError: No module named 'tkinter'.
Does it make sense to copy the package directories from /usr/lib64/python3.4 to the site_packages folder associated with the virtualenv?
I was using python 3.3.2 interpreter. Turns out the default packages installed when running the command yum install python3-tkinter are set to work with python 3.4.1 interpreter. Configuring my virtualenv to use the python 3.4.1 interpreter proved to be the solution as the python interpreter was then able to find the required libraries in it's path.

Resources