Stack Overflow Asked on November 27, 2021
My YAML config file for my conda environment looks like this (cut down)
name: proj36
channels:
- defaults
- pytorch
dependencies:
- numpy
- pandas==0.25.3
- python==3.6.10
- pytorch==1.2.0
- torchvision==0.4.0
If I was installing pytorch and torchvision from the command prompt I could specify the cpuonly version like this
conda install pytorch==1.2.0 torchvision==0.4.0 cpuonly -c pytorch
How should I add the cpuonly
option in my YAML config file without losing the version number?
I have tried
- pytorch==1.2.0 cpuonly
which gives the error
ResolvePackageNotFound:
- pytorch==1.2.0=cpuonly
and
- pytorch==1.2.0, cpuonly
which gives the error
ResolvePackageNotFound:
- pytorch[version='1.2.0,cpuonly']
What is the correct syntax?
(Bonus points if you can point me at some documentation where I might have worked out what to do.)
Got it, I needed to add the cpuonly
as another item at the end of the YAML dependencies list.
name: proj36
channels:
- defaults
- pytorch
dependencies:
- numpy
- pandas==0.25.3
- python==3.6.10
- pytorch==1.2.0
- torchvision==0.4.0
- cpuonly
Answered by dumbledad on November 27, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP