python package can be installed by pip but not conda

前端 未结 2 787
清酒与你
清酒与你 2020-12-19 14:32

I need the sacred package for a new code base I downloaded. It requires sacred. https://pypi.python.org/pypi/sacred

conda install sacred fails with PackageNotFound

相关标签:
2条回答
  • 2020-12-19 15:23

    It happens some issue to me before. If your system default Python environment is Conda, then you could download those files from https://pypi.python.org/pypi/sacred#downloads and manually install by

    pip install C:/Destop/some-file.whl
    
    0 讨论(0)
  • 2020-12-19 15:26

    That package is not available as a conda package at all. You can search for packages on anaconda.org: https://anaconda.org/search?q=sacred You can see the type of package in the 4th column. Other Python packages may be available as conda packages, for instance, NumPy: https://anaconda.org/search?q=numpy

    As you can see, the conda package numpy is available from a number of different channels (the channel is the name before the slash). If you wanted to install a package from a different channel, you can add the option to the install/create command with the -c/--channel option, or you can add the channel to your configuration conda config --add channels channel-name.

    If no conda package exists for a Python package, you can either install via pip (if available) or build your own conda package. This isn't usually too difficult to do for pure Python packages, especially if one can use skeleton to build a recipe from a package on PyPI.

    0 讨论(0)
提交回复
热议问题