I am trying to create a conda environment using the following environment.yml file:
conda env create -n med -f environment.yml
File contents:
name: med
channels:
- defaults
- conda-forge
dependencies:
- python=3.8
- batchgenerators==0.23
- pandas==1.1.5
- SimpleITK==2.2.1
- tensorboard==2.11.0
- tqdm
- pip
- pip:
- --extra-index-url https://download.pytorch.org/whl/cu117
- torch==1.13.1+cu117
- torchvision==0.14.1+cu117
The setup fails with:
ResolvePackageNotFound:
- batchgenerators
If I delete batchgenerators from the yml file, create the environment, conda activate it and try pip install batchgenerators - it is successful.
Further, using pip also works
conda create -n med
conda activate med
pip install -r requirements.txt
batchgenerators==0.23
pandas==1.1.5
SimpleITK==2.2.1
tensorboard==2.11.0
torch==1.13.1+cu117
torchvision==0.14.1+cu117
tqdm
Any suggestions to make conda work directly? Thanks, Bogdan
Thanks to @griko. Adding batchgenerators to the yml file fixed the issue because the package is available on pypi but not in conda defaults or conda forge.
- pip:
- --extra-index-url https://download.pytorch.org/whl/cu117
- torch==1.13.1+cu117
- torchvision==0.14.1+cu117
- batchgenerators==0.23
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.