Skip to content

Wheels are installed to the wrong location (root install) #213

@connorjward

Description

@connorjward

The wheel files are installed to the wrong location when installed using the root user (which we are doing inside a Docker container).

Steps to reproduce:

  1. docker run -it ubuntu:latest
  2. apt update && apt install python3-pip
  3. pip install --break-system-packages netgen-mesher
  4. ls /usr/local/lib/python3.12/

The expected outcome is for the files to be installed into /usr/local/lib/python3.12/dist-packages (which is what numpy does for example) but they are actually being put into /usr/local/lib/python3.12/site-packages which means that they cannot be found. I.e.

$ python -c "import netgen"

raises a ModuleNotFoundError. This can be worked around by setting PYTHONPATH=/usr/local/lib/python3.12/site-packages but that isn't ideal.

Looking at the contents of /netgen_mesher-6.2.2501.dist-info/RECORD in the wheel I see site-packages hard-coded for some of the paths which I think isn't right.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions