Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no pysdl2 installation found - Mac & Win #592

Closed
j1m3n3zj opened this issue Mar 29, 2022 · 13 comments
Closed

no pysdl2 installation found - Mac & Win #592

j1m3n3zj opened this issue Mar 29, 2022 · 13 comments

Comments

@j1m3n3zj
Copy link

Hello everyone, I am currently on macOS Monterey, and I am trying to launch the cfclient to use the antenna and gamepad, but I am running into this issue.

(venv) (base) juanjimenez@Juans-MBP-3 crazyflie-clients-python % cfclient CRITICAL:cfclient.gui:No pysdl2 installation found, #exiting! (venv) (base) juanjimenez@Juans-MBP-3 crazyflie-clients-python %

I am using the PyCharm IDE and also tried it on the terminal. I also tried to install dl2 on the pip install and uninstalled and reinstalled it.

#259 - Was referenced

Any guidance will help! Thank you

@knmcguire
Copy link
Contributor

Hi! Did you install it the client from source or the latest release?

And the python environment venv, does that only contain cfclient related packages or also other ones from other development environments?

@knmcguire knmcguire added the bug label Mar 30, 2022
@j1m3n3zj
Copy link
Author

Screen Shot 2022-03-30 at 10 01 00 AM

Screen Shot 2022-03-30 at 10 01 35 AM

The screenshots above are the ways the instructions that I followed for installation.

I have tried PyCharm and Anaconda.

As for your second question, it contains packages from other development environments (to the best of my knowledge) both for Anaconda and PyCharm.

For example, below, I see the cfclient within the Anaconda IDE, but when I search for the dl2 package, it is not coming up, no matter how many times I reinstall it.

Screen Shot 2022-03-30 at 10 04 32 AM

Thank you for your time! @knmcguire

@knmcguire
Copy link
Contributor

So it is not super clear which way you installed the cfclient (source or from release (pip)) but I assume you installed it with

pip3 install cfclient as I see you have the latest release namely 2022.03.

Could you check with pip3 list if you have the right pysdl packages installed?

@hhamahl
Copy link

hhamahl commented Mar 31, 2022

I had the same problem and it was solved by installing the pysdl packages above mentioned. pip3 install pysdl2
pip3 install pysdl2-dll

@knmcguire knmcguire changed the title no pysdl2 installation found - OS Monterey no pysdl2 installation found - Mac & Win Apr 5, 2022
@knmcguire
Copy link
Contributor

I just confirmed that this is also a problem in a fresh pip environment for windows...

So you would need to do:
pip install pysdl2~=0.9.6 pysdl2-dll==2.0.1

It is weird that the setup.py doesn't do this but we should have caught this with the release testing 2 weeks ago, so we would need to do another release relatively soon.

@knmcguire
Copy link
Contributor

Just an comment on this: with Win11 and python 3.10, installing it from source, this issue does not happen. Same with installing it directly from pip

@XinLong-Li
Copy link

I just confirmed that this is also a problem in a fresh pip environment for windows...

So you would need to do: pip install pysdl2~=0.9.6 pysdl2-dll==2.0.1

It is weird that the setup.py doesn't do this but we should have caught this with the release testing 2 weeks ago, so we would need to do another release relatively soon.

Is it should be:
pip install pysdl2~=0.9.6 pysdl2-dll==2.0.16
?

@knmcguire
Copy link
Contributor

ah yes seemed to be a typo indeed. You are right.

@knmcguire
Copy link
Contributor

The problem with this issue that this line in setup.py is not handled properly, but there is no idea why this happens. The ifstatement should still hold...

if sys.platform == 'win32' or sys.platform == 'darwin':
platform_requires.extend(['pysdl2~=0.9.14', 'pysdl2-dll==2.24.0'])

@krichardsson
Copy link
Contributor

I found this https://til.simonwillison.net/python/platform-specific-dependencies post of how to make platform dependent requirements. Maybe this will solve the problem?

@krichardsson
Copy link
Contributor

Fixed in #649

@knmcguire knmcguire added this to the next-release milestone Feb 20, 2023
@knmcguire
Copy link
Contributor

Unfortunately, when testing this on Windows 11, with an python 3.8 installed through the windows store, the problem remains that pysdl2 is not installed on windows. Hence why I'm reopening it.

@knmcguire knmcguire reopened this Feb 21, 2023
@knmcguire
Copy link
Contributor

nevermind... that was an older version of the cfclient! now it works with the release candidate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants