Pytorch installation for conda

Hi @Victor16 ,

Great to hear you got it working! I will try my best to address your remaining questions. Happy to help.


1. Channel configuration scope (global vs. environment-specific)

The commands you used:

conda config --add channels conda-forge
conda config --set channel_priority strict

These modify your global user configuration file (~/.condarc or C:\Users\<username>\.condarc on Windows), which affects all environments including base - not just the environment you were in when you ran the commands.

If you want environment-specific channel settings, you have two options:

  • Use the --env flag: conda config --env --add channels conda-forge

  • Or manually create a .condarc file in the root directory of that specific environment

Documentation: Using the .condarc configuration file Also see: conda config command reference

2. Cloning environments and channel priority

Channel configuration is not part of an environment’s package specification - it’s stored separately in .condarc files. When you clone an environment with conda create --clone, you’re copying packages only. The clone will use whatever channel configuration exists in your .condarc at that time, not any configuration from the source environment.

Documentation: Managing environments - Cloning

3. CUDA Toolkit (nvcc) recommendation

You’re correct that things work fine without installing the full CUDA toolkit. The cudatoolkit packages installed by conda with PyTorch only include runtime libraries needed to execute CUDA operations - they don’t include development tools like nvcc. You may need additional packages if you are doing work outside of the normal workflows using PyTorch like compiling custom CUDA C/C++ code or building PyTorch extensions that require compilation. Basically, it depends what you are trying to do.

4. This seems tied to conda which is an OSS project we help steward. The best way to get help would be to create a bug report in GH for the maintainers to review. You can find some instructions on that here - conda/CONTRIBUTING.md at main · conda/conda · GitHub. I messaged the team and they weren’t familiar with this issue. Providing as much detail in the GH issue as possible would help them investigate.

1 Like