1

I'm having trouble getting numpy installed on in a freebsd jail (13.2-release) (truenas). I've got python 3.11.3 installed and am using pip 23.1.2.

Specifics are - I can use pkg to install py311-numpy and that works fine, but I need a specific version of numpy (1.23.2) so need to use pip, I'm also trying to get it imported into a venv so better with pip anyway.

It just can't seem to build the wheels whatever I'm trying and I keep getting an odd error that I've not been able to find anything on;

`Overflowerror: could not allocate a large enough CPU set

Error: could not build wheel for numpy`

so latest version of numpy works great when installed from pkg, but I've tried to install multiple versions with pip and always get the same result, even the latest version that works from pkg. I've also tried using poetry and get the same error.

anyone seen this or could point me in the right direction?

RetroChap
  • 33
  • 1
  • 3
  • "*…numpy works great when installed from pkg…*" Because it comes precompiled. OTOH `pip install numpy==1.23.2` tries to get a wheel from https://pypi.org/project/numpy/1.23.2/#files, fails (no wheels for FreeBSD) and tries to compile from sources. My advice is: install FreeBSD into a VM or a containter with enough resources, [build from source](https://numpy.org/devdocs/user/building.html#building-from-source), copy the wheel to the jail and install it there. – phd Jun 09 '23 at 12:28
  • So you think this could actually be a resources issue then? I thought that from reading the error but, it's not a crazy powerful machine but it's not slow with a core i3 on it. – RetroChap Jun 09 '23 at 12:37
  • https://www.reddit.com/r/freebsd/comments/damzsh/try_to_install_python3_numpy_in_freebsdvm_but_it/ "*…it is still building right now. (15 hours)…*" OTOH, there is [a comment](https://www.reddit.com/r/freebsd/comments/damzsh/comment/f1rui5y/) "*…It took 105.73 seconds. That includes downloading the source code, but I did have all the dependencies installed. This is on my rather haphazard fileserver, AMD FX-8350 (only 4 cores, 4 cores are disabled) with 16GB of ram*" – phd Jun 09 '23 at 12:54
  • ahh, this is disappointing. I'm on core i3-6100 with 32GB ram, but it seems to error our within a second and isn't taxing the cpu at all. Same happens when building from source. Nothing else you could think of that I could look at? I don't have access to another machine so might just be stuck if not :( – RetroChap Jun 09 '23 at 13:30
  • "*…core i3-6100 with 32GB ram…*" Should be ok. "*…error our within a second…*" The error message says "could not allocate a large enough CPU set" so it fails at the very beginning. How do you install? `pip install`? Try to build from sources like `python setup.py build -j 4` lowering the number of processes: `python setup.py build -j2`, `python setup.py build -j1`. – phd Jun 09 '23 at 14:25
  • The latest version in the ports tree is the [freshport => numpy-1.24.1](https://www.freshports.org/math/py-numpy/) ; you will find out some other versions if you check the link I gave to you, you will see what is required to make it to work. If you need help in debugging, you have to provide relevant compilation output. Their is no magic, you want something specific, you have to make it by yourself. – Valery S. Jun 09 '23 at 19:40

0 Answers0