python – Creating conda environment return code 127
I tried during multiples days to create a conda environment with an yml file without success.
Below there is the execution result when I try to use the command to create my environment:
conda env create -f iml_env.yml
This is the execution result:
Collecting package metadata (repodata.json): / WARNING conda.models.version:get_matcher(556): Using .* with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.*, but conda is ignoring the .* and treating it as 1
done
Solving environment: done
Downloading and Extracting Packages
Preparing transaction: done
Verifying transaction: done
Executing transaction: - /home/matteo/anaconda3/envs/iml/bin/.widgetsnbextension-post-link.sh: line 1: /home/matteo/anaconda3/envs/iml/bin/jupyter-nbextension: No such file or directory
done
ERROR conda.core.link:_execute(945): An error occurred while installing package 'conda-forge::widgetsnbextension-3.5.2-py310hff52083_1'.
Rolling back transaction: done
LinkError: post-link script failed for package conda-forge::widgetsnbextension-3.5.2-py310hff52083_1
location of failed script: /home/matteo/anaconda3/envs/iml/bin/.widgetsnbextension-post-link.sh
==> script messages <==
/home/matteo/anaconda3/envs/iml/bin/.widgetsnbextension-post-link.sh: line 1: /home/matteo/anaconda3/envs/iml/bin/jupyter-nbextension: No such file or directory
==> script output <==
stdout:
stderr:
return code: 127
()
Now I tried many things to solve this issue but it won’t install. During the first days launching this command was only printing to the line:”Solving environment: done” and then crashed my computer, but now I get the previous error message.
So do you have any idea to help me create this environment please ?
Here is the yml file :
name: iml
channels:
- conda-forge
- defaults
- conda-forge/label/broken
dependencies:
- python=3.10
# Scientific/numeric libraries
- numpy
- scipy
- scikit-learn
- scikit-image
- pandas
# Plotting
- matplotlib
- seaborn
# GPU / Automatic diff / optimisation
- numba
# Utils
- tqdm
- click
# Jupyter
- qgrid
# Node
- nodejs
- pip
- pip:
- torch
- torchvision
- opencv-python
- imutils
- jupyterlab==4.0.2
- ipywidgets
I tried to install it “manually” package by package but at some point I got the previous error message.
I also tried to remove “conda-forge” and “conda-forge/label/broken” from the yml without success. I tried to create the env with anaconda-navigator but it crashed anaconda-nav and I tried to launch the command after updating everything all my computer but still didn’t succeed.
What can I try next please ? Also I’m on Ubuntu.
Read more here: Source link