Open marinegor opened 2 months ago
I ran into a similar(?) issue with pip install
(but not pip install -e
) (see Discord message):
I am trying to install the development version (actually, the dask-0 branch from the parallelization PR), following the instructions in the user guide https://userguide.mdanalysis.org/stable/contributing_code.html#creating-a-development-environment but creating a Python 3.11 environment (on macOS) with the packages from https://userguide.mdanalysis.org/stable/contributing_code.html#id1
When doing pip install it complains about absolute paths and I get this error:
$ python -m pip install .
Processing ~/MDAnalysis/mdanalysis/package
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
...
adding license file 'AUTHORS'
writing manifest file 'MDAnalysis.egg-info/SOURCES.txt'
error: Error: setup script specifies an absolute path:
~/MDAnalysis/mdanalysis/package/MDAnalysis/analysis/encore/cutils.c
setup() arguments must *always* be /-separated paths relative to the
setup.py directory, *never* absolute paths.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for MDAnalysis
Failed to build MDAnalysis
ERROR: Could not build wheels for MDAnalysis, which is required to install pyproject.toml-based projects
Note that I didn't want an editable install pip install -e, which actually works.
p.s.: If my issue is different from @marinegor 's then I can also open a new issue.
@orbeckst and @marinegor do your python install environments have a base setuptool / pip installl?
Also @orbeckst could you confirm your macos version?
@IAlibay how do I check for that? I'm working inside a standard python3 -m venv venv
virtual environment.
My env has ~/anaconda3/envs/mda311dask/bin/pip
setuptools 69.5.1 pyhd8ed1ab_0 conda-forge
pip 24.0 pyhd8ed1ab_0 conda-forge
cython 3.0.10 py311hdd0406b_0 conda-forge
@IAlibay how do I check for that? I'm working inside a standard
python3 -m venv venv
virtual environment.
Not sure 😅, does uv pip list
do anything?
Not sure 😅, does uv pip list do anything?
$ uv pip list
# empty
$ uv pip freeze
# empty
🤷♂️🤷♂️🤷♂️
Processing ~/MDAnalysis/mdanalysis/package
@orbeckst This seems a bit fishy. Is there a tilde in your file path? I think Python does not handle paths with tildes very well. I cannot reproduce the error with my mac (sonoma 14.4). My output for this line is Processing /Users/username/MDAnalysis/mdanalysis/package
No, that was me manually sanitizing paths before posting. These are full absolute paths in the real output.
No, that was me manually sanitizing paths before posting. These are full absolute paths in the real output.
That's what I suspected :)
What if you remove the package/MDAnalysis.egg-info
and try to install it again?
@yuxuanzhuang I deleted the existing MDAnalysis.egg-info
and repeated pip install .
and I now succeeded
$ pip install .
Processing ~/MDAnalysis/mdanalysis/package
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
...
Building wheels for collected packages: MDAnalysis
Building wheel for MDAnalysis (pyproject.toml) ... done
Created wheel for MDAnalysis: filename=MDAnalysis-2.8.0.dev0-cp311-cp311-macosx_10_9_x86_64.whl size=44937915 sha256=753a30559ddcbe1dc77c74a5062bb188e1277c09b876641708aaa35250a4ce7f
Stored in directory: /private/var/folders/sm/37rm_wm16tq9qsf4n5md98ph0000gp/T/pip-ephem-wheel-cache-16mg3cpr/wheels/e5/2d/a7/19ab06b9a8db11b2f6e588001b5e27bb0dae5c7427ff5a7d03
Successfully built MDAnalysis
Installing collected packages: MDAnalysis
Successfully installed MDAnalysis-2.8.0.dev0
Thank you very much — my problem is solved.
Expected behavior
I want to install full MDAnalysis package from
dask-0
branch on macOS laptop.Actual behavior
I get following log:
Code to reproduce the behavior
Current version of MDAnalysis
I also noticed something weird -- after the first time I got the bug, I couldn't reproduce it, i.e. the code above worked when I tested it while writing the issue, so I'm not sure how to reproduce it anymore. Anyway, raising it, since there might be something