Skip to content
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

"Editable" installation broken #3047

Closed
arokem opened this issue Jan 18, 2024 · 4 comments
Closed

"Editable" installation broken #3047

arokem opened this issue Jan 18, 2024 · 4 comments

Comments

@arokem
Copy link
Contributor

arokem commented Jan 18, 2024

On current master, if I run:

$ cd ~/source/dipy
$ pip install -e .

I get the following error:

$ python -c"import dipy"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1002, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 945, in _find_spec
  File "/Users/arokem/miniconda3/envs/afq/lib/python3.10/site-packages/_dipy_editable_loader.py", line 271, in find_spec
    tree = self.rebuild()
  File "/Users/arokem/miniconda3/envs/afq/lib/python3.10/site-packages/_dipy_editable_loader.py", line 312, in rebuild
    subprocess.run(self._build_cmd, cwd=self._build_path, env=env, stdout=stdout, check=True)
  File "/Users/arokem/miniconda3/envs/afq/lib/python3.10/subprocess.py", line 503, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/Users/arokem/miniconda3/envs/afq/lib/python3.10/subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/Users/arokem/miniconda3/envs/afq/lib/python3.10/subprocess.py", line 1847, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/private/var/folders/px/t5ym05pn5k16nz97mzcpqqkr0000gn/T/pip-build-env-pdnh8g08/normal/bin/ninja'

No such issue when using

$ pip install . 

instead. Anyone see anything similar? As you can see in the trace, I am doing this on a conda env with Python 3.10.

@skoudoro
Copy link
Member

Hi @arokem,

as documented, you need to use pip install --no-build-isolation -e . now

also, you need to make sure you install the necessary build dependency before. pip install -r requirements/build.txt

see here: https://docs.dipy.org/stable/devel/installation_from_source.html#building-and-installing

closing, feel free to reopen.

@arokem
Copy link
Contributor Author

arokem commented Jan 18, 2024

Oh yes - thanks for the reminder!

@samcoveney
Copy link
Contributor

Any chance this could be in the README ?

@arokem
Copy link
Contributor Author

arokem commented Apr 24, 2024

Haha! I'm with you on that. I have to search for this issue every time I install to find the right command. I'd be +1 for a PR adding this to the Readme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants