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

[Bug]: Package installer installs numpy2 into psychopy3 site-packages which causes all scripts to fail #6856

Open
j-ales opened this issue Sep 16, 2024 · 3 comments
Labels
🐞 bug Issue describes a bug (crash or error) or undefined behavior.

Comments

@j-ales
Copy link
Contributor

j-ales commented Sep 16, 2024

PsychoPy Version

2024.2.1

What OS are your PsychoPy running on?

macOS Silicon

Bug Description

When I tried installing a python package through the psychopy interface it installed numpy 2.0 as well. Numpy2.0 is not compatabible with numpy1.0. When you go to run a script it generates an error message and refuses to run.

I fixed it by deleting the .psychopy3 directory from my home directory.

Expected Behaviour

The package installer should not have installed numpy2.0.

Steps to Reproduce

  1. Use package installer gui to install moviepy
  2. Run pretty much any psychopy script.

Additional context

No response

@j-ales j-ales added the 🐞 bug Issue describes a bug (crash or error) or undefined behavior. label Sep 16, 2024
@j-ales j-ales changed the title [Bug]: Package installer installs numpy2 into psychopy3 site-packages which icauses [Bug]: Package installer installs numpy2 into psychopy3 site-packages which causes all scripts to fail Sep 16, 2024
@j-ales
Copy link
Contributor Author

j-ales commented Sep 16, 2024

Additionally, since the site-package is installed in the .pscyopy3 directory this issue persists across reinstalls of the app.

@peircej
Copy link
Member

peircej commented Sep 16, 2024

I guess you've installed a plugin that had numpy>=2 as a requirement so that's been installed here. Any idea what packages/plugins you had installed that led to this? Hopefully our recommended packages don't have that

I mean, I guess we need to work out what the right solution is here if a user installs something that clashes with core psychopy (and systems like pdm that check detailed requirements constraints are a minefield!)

Additionally, since the site-package is installed in the .pscyopy3 directory this issue persists across reinstalls of the app.

That aspect is certainly by design

  • we think most users would want their plugins (and dependencies of those) to be use
  • we can't install inside the app itself because that would mean the user changing the app for all other users (and would require admin permissions)

@j-ales
Copy link
Contributor Author

j-ales commented Sep 16, 2024

It was moviepy that I installed. For the webcam component.

I totally understand that design decision. It’s just that once I borked the system it took some wrangling to recover. Uninstalling moviepy from within didn’t remove numpy. Just wanted to identify that it’s a failure mode that bricks across installs.

Numpy 2 is really annoying at the moment because of the incompatibility and ease that installs upgrade things and the lack of specific protection for numpy<2.0 having not yet proliferated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Issue describes a bug (crash or error) or undefined behavior.
Projects
None yet
Development

No branches or pull requests

2 participants