indygreg / indygreg/PyOxidizer

Unable to use numpy

Open
#65 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug compatibility
Dominant language
Rust
Stars
6.2k
Forks
256
PR merge metrics
No merged PRs in 30d

Description

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.

  1. I tried to use numpy in my project, and I got an error saying there wasn't a module called numpy. I created a virtual environment with numpy, scipy, and matplotlib. I installed these modules with pip, and was able to confirm that they work with a simple test script which plots random numbers.
  2. I ran into the __file__ issue in numpy.__config__, where it tries to look for an extra .libs directory. I replaced that line with a hardcoded string value.
  3. I tried with and without sys_paths = ["$ORIGIN/lib"] in embedded_python_config, it didn't seem to make a difference.
  4. Ultimately, I get this error: 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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the packaged test project with the reported Ubuntu, Python, and Rust versions, then inspect numpy.config and the embedded_python_config setting mentioned in the report. Done means the packaged project imports numpy successfully, including numpy.core._multiarray_umath, without requiring manual edits or external dependency workarounds.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python, rust
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.