2

I am trying to create a conda env

conda create --name sf-prj-final --file requirements.txt

But I have encountered error says:

PackagesNotFoundError: The following packages are not available from current channels:

  - grpcio==1.31.0=pypi_0
  - idna==2.10=pypi_0
  - google-auth==1.20.1=pypi_0
  - requests-oauthlib==1.3.0=pypi_0
  - pyasn1==0.4.8=pypi_0
  - oauthlib==3.1.0=pypi_0
  - pyasn1-modules==0.2.8=pypi_0
  - tensorboard-plugin-wit==1.7.0=pypi_0
  - pypng==0.0.18=pypi_0
  - correlation-cuda==0.0.0=pypi_0
  - werkzeug==1.0.1=pypi_0
  - tensorboard==2.3.0=pypi_0
  - torchvision==0.4.0=py37_cu100
  - importlib-metadata==1.7.0=pypi_0
  - zipp==3.1.0=pypi_0
  - absl-py==0.9.0=pypi_0
  - urllib3==1.25.10=pypi_0
  - cachetools==4.1.1=pypi_0
  - google-auth-oauthlib==0.4.1=pypi_0
  - forward-warp-cuda==0.0.0=pypi_0
  - chardet==3.0.4=pypi_0
  - markdown==3.2.2=pypi_0
  - rsa==4.6=pypi_0
  - requests==2.24.0=pypi_0
  - pytorch==1.2.0=py3.7_cuda10.0.130_cudnn7.6.2_0
  - protobuf==3.12.4=pypi_0

Current channels:

  - https://repo.anaconda.com/pkgs/main/linux-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/free/linux-64
  - https://repo.anaconda.com/pkgs/free/noarch
  - https://repo.anaconda.com/pkgs/r/linux-64
  - https://repo.anaconda.com/pkgs/r/noarch
  - https://repo.anaconda.com/pkgs/pro/linux-64
  - https://repo.anaconda.com/pkgs/pro/noarch
  - https://conda.anaconda.org/conda-forge/linux-64
  - https://conda.anaconda.org/conda-forge/noarch

I understand the problem. I have to install these packages from pip but is there any solution with conda to install all packages while creating conda environment?

Thank you.

1 Answers1

0

I am assuming that you are trying to install packages from the txt file to an already created environment - and that's why you are getting this error. the files that are listed in your error msg are packages that exist in the env (run conda list and you can see that they are already there).

So.. you have 2 possible solutions:

  1. Enter your env (conda activate mypyenv) and remove these packages that are listed in the error msg (conda remove somepackage). they try applying these requirements again.
  2. Use the create command to create a whole new environment with these packages: conda create --name mynewpythonenv --file requirements.txt
Dharman
  • 30,962
  • 25
  • 85
  • 135
Imnotapotato
  • 5,308
  • 13
  • 80
  • 147
  • Hello, Thank you first of all. But I have already tried the command `conda create --name sf-prj-final --file requirements.txt` –  Aug 02 '21 at 22:01
  • this makes no sense. if they are already installed, conda will say 'these are already installed' – Michael Dausmann Sep 03 '21 at 03:43