Conda/anaconda doesn't work/?

Hi,
This cryptic title was supposed to convey my puzzlement and irritation.
I have to try talking face generation programs, which all seem to use python.
I need to run:

conda install scikit-learn-intelex pytorch=0.4.1 torchvision cuda90 -c pytorch

to install the aforementioned packages.

drm@dr-80qr ~ (main)> conda install scikit-learn-intelex pytorch=0.4.1 torchvision cuda90 -c pytorch
NoBaseEnvironmentError: This conda installation has no default base environment. Use
'conda create' to create new environments and 'conda activate' to
activate environments.
drm@dr-80qr ~ (main) [1]> conda activate
drm@dr-80qr ~ (main)> sudo conda activate                                                                                        (base) 
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run
    $ conda init <SHELL_NAME>
Currently supported shells are:
  - bash
  - fish
  - tcsh
  - xonsh
  - zsh
  - powershell
See 'conda init --help' for more information and options
IMPORTANT: You may need to close and restart your shell after running 'conda init'.
drm@dr-80qr ~ (main) [1]> sudo conda init fish                                                                                   (base) 
no change     /usr/condabin/conda
no change     /usr/bin/conda
no change     /usr/bin/conda-env
no change     /usr/bin/activate
no change     /usr/bin/deactivate
no change     /usr/etc/profile.d/conda.sh
no change     /usr/etc/fish/conf.d/conda.fish
no change     /usr/shell/condabin/Conda.psm1
no change     /usr/shell/condabin/conda-hook.ps1
no change     /usr/lib/python3.10/site-packages/xontrib/conda.xsh
no change     /usr/etc/profile.d/conda.csh
no change     /root/.config/fish/config.fish
No action taken.
drm@dr-80qr ~ (main)> conda install scikit-learn-intelex pytorch=0.4.1 torchvision cuda90 -c pytorch                             (base) 
NoBaseEnvironmentError: This conda installation has no default base environment. Use
'conda create' to create new environments and 'conda activate' to
activate environments.

I don’t care if it’s something else than “conda”, I just want to install the packages simply and call it a day.

Thanks for your help

Aren’t those packages in the repo?

Could you not use?

sudo pacman -Syu python-torchvision-cuda python-scikit-learn

If you want to use conda, it looks like the output you shared clearly tells you the command you need to run so I am not sure what more I can add there…

I need to install pycuda and it fails:

     gcc -pthread -B /home/drm/.conda/envs/drm/compiler_compat -Wl,--sysroot=/ -Wsign-compare -fwrapv -Wall -O3 -DNDEBUG -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_THREAD_BUILD_DLL=1 -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION=1 -DBOOST_PYTHON_SOURCE=1 -Dboost=pycudaboost -DBOOST_THREAD_DONT_USE_CHRONO=1 -DPYGPU_PACKAGE=pycuda -DPYGPU_PYCUDA=1 -DHAVE_CURAND=1 -Isrc/cpp -Ibpl-subset/bpl_subset -I/tmp/pip-build-env-4p1_vh6c/overlay/lib/python3.7/site-packages/numpy/core/include -I/home/drm/.conda/envs/drm/include/python3.7m -c src/cpp/bitlog.cpp -o build/temp.linux-x86_64-cpython-37/src/cpp/bitlog.o
      gcc -pthread -B /home/drm/.conda/envs/drm/compiler_compat -Wl,--sysroot=/ -Wsign-compare -fwrapv -Wall -O3 -DNDEBUG -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_THREAD_BUILD_DLL=1 -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION=1 -DBOOST_PYTHON_SOURCE=1 -Dboost=pycudaboost -DBOOST_THREAD_DONT_USE_CHRONO=1 -DPYGPU_PACKAGE=pycuda -DPYGPU_PYCUDA=1 -DHAVE_CURAND=1 -Isrc/cpp -Ibpl-subset/bpl_subset -I/tmp/pip-build-env-4p1_vh6c/overlay/lib/python3.7/site-packages/numpy/core/include -I/home/drm/.conda/envs/drm/include/python3.7m -c src/cpp/cuda.cpp -o build/temp.linux-x86_64-cpython-37/src/cpp/cuda.o
      In file included from src/cpp/cuda.cpp:4:
      src/cpp/cuda.hpp:14:10: fatal error: cuda.h: No such file or directory
         14 | #include <cuda.h>
            |          ^~~~~~~~
      compilation terminated.
      /tmp/pip-build-env-4p1_vh6c/overlay/lib/python3.7/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'pycuda.cuda' as data is deprecated, please list it in `packages`.
          !!
      
      
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'pycuda.cuda' as an importable package,
          but it is not listed in the `packages` configuration of setuptools.
      
          'pycuda.cuda' has been automatically added to the distribution only
          because it may contain data files, but this behavior is likely to change
          in future versions of setuptools (and therefore is considered deprecated).
      
          Please make sure that 'pycuda.cuda' is included as a package by using
          the `packages` configuration field or the proper discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).
      
          You can read more about "package discovery" and "data files" on setuptools
          documentation page.
      
      
      !!
      
        check.warn(importable)
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pycuda
  Building wheel for pytools (setup.py) ... done
  Created wheel for pytools: filename=pytools-2022.1.12-py2.py3-none-any.whl size=65020 sha256=af45ad903ba1109cb5898d7703d86265cf0bea546825306098299a95aefae8b7
  Stored in directory: /home/drm/.cache/pip/wheels/70/66/c5/0e1aa142b95fcc33b92e0617331c6b130f8245154d77628998
Successfully built pytools
Failed to build pycuda
ERROR: Could not build wheels for pycuda, which is required to install pyproject.toml-based projects
(drm) [drm@dr-80qr flownet2-pytorch]$ 

what is this ? I want to use flownet2-pytorch as a requirement for https://github.com/lelechen63/Talking-head-Generation-with-Rhythmic-Head-Motion, and install.sh fails over:

/home/drm/.conda/envs/drm/lib/python3.7/site-packages/torch/include/c10/cuda/CUDAMacros.h:4:10: fatal error: c10/cuda/impl/cuda_cmake_macros.h: No such file or directory
4 | #include <c10/cuda/impl/cuda_cmake_macros.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command ‘/opt/cuda/bin/nvcc’ failed with exit code 1

Now you know the whole story… This whole crap is nightmarish compared to what I’m used to, paru blabla and done.

I’ve heard conda is a mess on Arch. From what I’ve heard, the best practice is to download miniconda.sh and run it as non-root pointing to a folder into $HOME. You can then create all your venvs in there and when your done or get tired of it you can just delete that folder. You can choose to use the conda init to modify your bashrc or zshrc or not and add your config/paths manually.