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

Fails to add custom python packages under Linux #76

Closed
Necrorez opened this issue Oct 24, 2024 · 2 comments
Closed

Fails to add custom python packages under Linux #76

Necrorez opened this issue Oct 24, 2024 · 2 comments

Comments

@Necrorez
Copy link

I'm experiencing an issue when trying to install and use Python packages (Debian 11, Debian 12, Arch) (specifically numpy) in a Godot 4.3 project. I followed the steps from the "Installing packages for python" documentation, but I encountered the following error when attempting to use numpy:

ImportError: Error importing numpy: you should not try to import numpy from
    its source directory; please exit the numpy source tree, and relaunch
    your python interpreter from there.

Error Traceback:

File "/mnt/storage/projects/test/new-game-project/addons/py4godot/cpython-3.12.4-linux64/python/lib/python3.12/site-packages/numpy/_core/__init__.py", line 23, in <module>
  from . import multiarray
File "/mnt/storage/projects/test/new-game-project/addons/py4godot/cpython-3.12.4-linux64/python/lib/python3.12/site-packages/numpy/_core/multiarray.py", line 10, in <module>
  from . import overrides
File "/mnt/storage/projects/test/new-game-project/addons/py4godot/cpython-3.12.4-linux64/python/lib/python3.12/site-packages/numpy/_core/overrides.py", line 8, in <module>
  from numpy._core._multiarray_umath import (
ImportError: /mnt/storage/projects/test/new-game-project/addons/py4godot/cpython-3.12.4-linux64/python/lib/python3.12/site-packages/numpy/_core/_multiarray_umath.cpython-312-x86_64-linux-gnu.so: undefined symbol: PyObject_SelfIter

Other packages seem to work. But numpy is one of the most essential (OpenCV, Pandas, SciPy, scikit-learn).
Also I've tried all the possible releases. Building from source also fails on my machines.

niklas2902 added a commit that referenced this issue Oct 28, 2024
@Necrorez
Copy link
Author

Works with the numpy fix. Thanks.

@niklas2902
Copy link
Owner

Hey,
thank you for checking the release. Sorry for not being as active latetly

niklas2902 added a commit that referenced this issue Oct 31, 2024
# Conflicts:
#	py4godot/script_language/PyLanguage.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants