How to install packages in conda that are not available in anaconda? (conda:4.7.5, python:3.7.3)

好久不见. 提交于 2020-12-03 01:49:06

问题


I want to install a package (of python) using conda, but says not available in repo.anaconda.com/......., how could I install it ?

The specific package that I tried to install is edx-dl (link of the github repo) using the code conda install edx-dl. This code works fine with pip but not with conda.

For example, in pip if I type pip install edx-dl was able to install the package when I was using python base without anaconda. But now with conda it says it is not available in anaconda repo. So if a package that are not available in anaconda, can be installed?

So to generalize, is there any way to download and install packages of python using conda which are not available in repo.anaconda.com?

Note that, I do not use base python, rather currently using anaconda. So, can't use pip to install that package.

Thanks!


Error message that I got:

(base) C:\WINDOWS\system32>conda install edx-dl

WARNING conda.base.context:use_only_tar_bz2(632): Conda is constrained to only using the old .tar.bz2 file format because you have conda-build installed, and it is <3.18.3. Update or remove conda-build to get smaller downloads and faster extractions. Collecting package metadata (repodata.json): done Solving environment: failed

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

  • edx-dl

Current channels:

  • https://repo.anaconda.com/pkgs/main/win-64
  • https://repo.anaconda.com/pkgs/main/noarch
  • https://repo.anaconda.com/pkgs/r/win-64
  • https://repo.anaconda.com/pkgs/r/noarch
  • https://repo.anaconda.com/pkgs/msys2/win-64
  • https://repo.anaconda.com/pkgs/msys2/noarch

To search for alternate channels that may provide the conda package you're looking for, navigate to

https://anaconda.org

and use the search bar at the top of the page.


回答1:


in terminal type:

conda activate <env_name>

then:

pip install edx-dl

will work on conda env this library




回答2:


Thanks @Kasper for your answer. Following your answer, I was able to solve the problem. Here I give the complete procedure for anyone who is new.

Step 1: Open "Anaconda Prompt". (I opened as "Run as Administrator" to avoid any problem in installation.)

Step 2: type conda info --envs to cheek your available environments.

  • one environment for sure you should have is base & another one Classes_and_Inheritance also should appear.

  • I had PyCharm installed, so with that I had to open some projects. So, I had some additional environments too.

Step 3: type conda activte <environment_name>

  • this environment name substitute by your preferred environment (i.e. base, Classes_and_Inheritance or any other environment that you have created. )
  • In my case I used conda activate PyCharm_Proj, but if you want can use like this conda activate base

Step 4: type pip install <package_name>. The package_name substitute by the name of the package name you want to install. (i.e. in my case I typed pip install edx-dl)



来源:https://stackoverflow.com/questions/57326043/how-to-install-packages-in-conda-that-are-not-available-in-anaconda-conda4-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!