-
-
Notifications
You must be signed in to change notification settings - Fork 243
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
Unable to use numpy #65
Comments
Consider posting your |
Packaging C extensions from pre-built virtualenvs won't work (this needs to be documented better). C extensions will only be packaged for packaging rules that invoke pip or setup.py. But, uh, when I try this myself, the I'll need to look into this in more detail. Thanks for the bug report! |
TIL NumPy vendors its own complete copy of This is... extremely annoying. But I don't think it is the end of the world. There are likely ways we can still use NumPy's version of I wonder how many other Python packages go to the lengths that NumPy is. I'm willing to wager it is less than 10. I'm half tempted to submit patches against NumPy to do something infinitely more reasonable than vendoring a complete copy of |
I tried to use
Python code:
|
did you have any luck in actually running the script with numpy? I was also able to build with >>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "numpy", line 126, in <module>
File "numpy.__config__", line 9, in <module>
NameError: name '__file__' is not defined As stated in #69 this should be reported to numpy, right? |
I was able to get numpy to work with Nuitka, but not PyOxidizer. I haven't tried since I opened the bug report, and it looks like there's been nine commits since. I should try again. |
I'm having issues installing |
FWIW, I appear to be able to build numpy with pyox, but am running into the issue that it requires >>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "numpy", line 126, in <module>
File "numpy.__config__", line 9, in <module>
NameError: name '__file__' is not defined |
PyOxidizer 0.9 has a new files mode which can be leveraged to enable PyOxidizer to work with complex packages like NumPy. See https://pyoxidizer.readthedocs.io/en/v0.9.0/packaging_additional_files.html#installing-unclassified-files-on-the-filesystem for an example of how to get NumPy working with PyOxidizer. The feature is still you and it doesn't provide the full PyOxidizer benefits. But it does enable NumPy to work with PyOxidizer. |
Hello, I am running into the issue with numpy.
Any ideas? pyoxidizer.bzl:
pyproject.toml:
|
Hi, appreciate this repo is no longer maintained but I'm wondering if anyone managed to get Numpy working in it ? If so, do you have an example you can share? Thanks heaps! |
OS: Ubuntu 19.04 64-bit
Python: Python 3.7.3
Rust: 1.35.0
I'm unable to use
numpy
in my test project.numpy
in my project, and I got an error saying there wasn't a module callednumpy
. I created a virtual environment withnumpy
,scipy
, andmatplotlib
. I installed these modules withpip
, and was able to confirm that they work with a simple test script which plots random numbers.__file__
issue innumpy.__config__
, where it tries to look for an extra.libs
directory. I replaced that line with a hardcoded string value.sys_paths = ["$ORIGIN/lib"]
inembedded_python_config
, it didn't seem to make a difference.No module named 'numpy.core._multiarray_umath'
.I made sure that the
gfortran
,libopenblas
, and other dependencies were installed, in case that was part of the issue, but it didn't help. Ultimately, I'd like to use this project to make a more portable version of a larger project which has a few C-based module dependencies.The text was updated successfully, but these errors were encountered: