[cfclient] PySDL version missmatch on macOS

Post here to get support
Post Reply
alex
Expert
Posts: 137
Joined: Mon Feb 18, 2013 11:36 am
Location: Germany

[cfclient] PySDL version missmatch on macOS

Post by alex »

Hi,

I'm trying to run cfclient on macOS. I followed the instructions for installing on MacOSX. During installation of cfclient it says
ERROR: cfclient 2020.2 has requirement pysdl2==0.9.6, but you'll have pysdl2 0.9.7 which is incompatible.
When starting cfclient using

Code: Select all

python3 -m cfclient.gui
it says
MacBook:~ alex$ python3 -m cfclient.gui
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 185, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 111, in _get_module_details
__import__(pkg_name)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/cfclient/__init__.py", line 46, in <module>
VERSION = pkg_resources.require("cfclient")[0].version
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 901, in require
needed = self.resolve(parse_requirements(requirements))
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 792, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (PySDL2 0.9.7 (/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages), Requirement.parse('pysdl2==0.9.6'), {'cfclient'})
Seems like cfclient is expecting PySDL 0.9.6 instead of installed version 0.9.7.

How can I fix this?

Thanks in advance.

alex
kristoffer
Bitcraze
Posts: 322
Joined: Tue Jun 30, 2015 7:47 am

Re: [cfclient] PySDL version missmatch on macOS

Post by kristoffer »

Hi!

It seems as 0.9.6 is hard coded in setup.py. I created an github issue for this https://github.com/bitcraze/crazyflie-c ... issues/425

Until it is fixed you can either downgrade pysdl2 to 0.9.6 or modify setup.py to 0.9.7 (if you are running from source code)
alex
Expert
Posts: 137
Joined: Mon Feb 18, 2013 11:36 am
Location: Germany

Re: [cfclient] PySDL version missmatch on macOS

Post by alex »

Kristoffer,

sorry for my late answer.

I finally managed to start up cfclient on MacOS. I had to downgrade PySDL to version 0.9.6. At first, due to my limited knowledge about Python and its packaging system I did this for Python 2 mistakenly. Of course this helped nothing at all since cfclient and PySDL were added for use with Python 3:

Code: Select all

python3 -m pip install cfclient[qt5] pysdl2
So I uninstalled PySDL completely for both Python 2 and 3 using

Code: Select all

pip uninstall pysdl2
and

Code: Select all

python3 -m pip uninstall pysdl2
Afterwards I made a clean install of specific PySDL version 0.9.6 for Python 3 with

Code: Select all

python3 pip install pysdl2==0.96
This worked for me. Maybe this helps other clueless people like me with getting cfclient up and running on MacOS.

alex
Post Reply