HOMEBREW PYSIDE2 - It is not recognizable by python - pyside2

I installed pyside2 through homebrew. It installs python10.
I confirmed that python10 is working bu python3 --version
But i get an error when importing pyside2 in python console.
Is there something that i miss?
many thanks.
m1, osx 12.6.1

Related

Installation of cx_Freeze fails

the installation of cx_Freeze fails with the error displayed in the screenshot below. I would be thankful if someone could guide me through the installation. The installation is attempted on Macbook with M1.
Thank you so much in advance.
Same was happening to me, I was using Python version 3.10.3 and the same error was launched. Nevertheless, a collegue with the same Macbook with M1 could install it using Python 3.9.9 I tried and it worked for me. See pictures for confirmation.
Python version
pip list with cx-Freeze
I use virtual environment in PyCharm taking the python version from my pyenv pythons.
To install cx-Freeze I confirmed that it is installing it in the venv using:
pip install cx_Freeze
And also if set in a requirements.txt using
pip install -r requirements.txt
I do not know which is the package that uses cx-Freeze is still not supported in python 3.10, but for 3.9.9 it will work ;)

Trying to install pygame on OSX 10.11 for python2

I'm running OSX 10.11 and have python 2.7.10 installed on my computer. I want to install pygame1.9.2 for the said environment (don't want to install it for python3 which is installed on my computer as well).
When I try to install this one - http://www.pygame.org/ftp/pygame-1.9.2pre-py2.7-macosx10.7.mpkg.zip - it says, "This package is incompatible with this version of OS X and may fail to install." Even if I continue, installation fails somehow.
I tried "pip install pygame" then it says
"Collecting pygame Could not find a version that satisfies the
requirement pygame (from versions: ) No matching distribution found
for pygame. "
How do I install it?
(for future reference) After spending many hours I found the following command to be working!
sudo pip install --user git+https://github.com/pygame/pygame/
It's not 1.9.2 but can run what I wanted with python 2.7.10
>>> pygame.__version__
'2.0.0.dev0'

Pygame Python 2.7 osx failures

I've installed the quasiben 64 bit osx Pygame version using conda. I'm running Python 2.7.1 and I've made sure the library was installed by doing :
$ conda search pygame
and getting the following :
pygame * 1.9.1 py27_1 quasiben
Anyway when I try to import the library in one of my .py program, I get the following failures :
ImportError: dlopen(/Users/usrname/anaconda/lib/python2.7/site-packages/pygame/base.so, 2): Library not loaded: /usr/local/lib/libSDL-1.2.0.dylib
Referenced from: /Users/usrname/anaconda/lib/python2.7/sitepackages/pygame/base.so
Reason: image not found
My system is El Capitan.
Try just uninstalling pygame and reinstalling it: https://www.youtube.com/watch?v=c_TzqzKZpMw
And make sure your pygame version is up to date along with your python.
It looks like you are missing one of the dependencies. Try to install all dependencies using brew:
brew install sdl sdl_ttf sdl_image sdl_mixer portmidi
This article has nice instruction on how to install PyGame from scratch on OS X.

pyenchant installation on OS X Yosemite

I am trying to install pyenchant on Mac OS X Yosemite. It works fine on linux machines but not in mac, I am having the following error:
ImportError: The 'enchant' C library was not found. Please install it via your OS package manager, or use a pre-built binary wheel from PyPI.
This is how I installed the package:
pip install pyenchant
and next, I import it in this way:
import enchant
I am using Python 3.4.
Enchant is a C library, and pyenchant provides Python bindings to that library.
For your code to work, you need to install Enchant as well.
If you're using homebrew, you can use:
>>brew install enchant
After installing Enchant, you can then install Pyenchant:
>>pip install pyenchant
I hope this helps.
Also, make sure your Xcode is updated. If it is not updated, you will get an error when running the brew installer:
configure: error: cannot run C compiled programs.

Installing uWSGI with asyncio support on MAC OS X 10.10 Yosemite

I've tried to build uWSGI with asyncio support following the uWSGI documentation. I'm using OS X 10.10 Yosemite with Virtualenv.
First I've used the command python3-config --include to get my python3 include path. But when I try to build uWSGI + Asyncio with the following command:
CFLAGS="-I/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/include/python3.4m" UWSGI_PROFILE="asyncio" pip install uwsgi
I'm getting the following error:
plugins/greenlet/greenlet.c:2:10: fatal error: 'greenlet/greenlet.h' file not found
#include <greenlet/greenlet.h>
^
1 error generated.
Has anyone run into this issue before? I've tried tu install Greenlet first using pip in my virtualenv and in my global python instalation but I'm still getting 'greenlet/greenlet.h' file not found. Any advice?
Fixed! Looks like the first thing needed was installing greenlet on the global python3.4 interpreter:
pip3 install greenlet
and then run the uWSGI + Asyncio installation on virtualenv as follows:
CFLAGS="-I/usr/local/include/python3.4m" UWSGI_PROFILE="asyncio" pip install uwsgi
If someone needs more detail, I've created a small tutorial:
How to install uWSGI + Asyncio on Mac (OS X 10.10 Yosemite)

Resources