如何在 Pycharm 中安装 python-binance 包? (我正在为我的项目使用 conda 解释器)

How can I install python-binance package in Pycahrm? (I am using the conda interpreter for my project)

我正在尝试将 Python-binance 软件包安装到 Pycharm,但它不适用于我使用的 conda 解释器。

当我尝试在我的终端中通过 'conda install python-binance' 安装它时,出现以下错误:

(base) patrickchong@Patricks-MacBook-Pro ~ % conda install python-binance
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

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

  - python-binance

Current channels:

  - https://repo.anaconda.com/pkgs/main/osx-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/osx-64
  - https://repo.anaconda.com/pkgs/r/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.

这很奇怪,因为当我 运行 'pip install python-binance'.

时它安装正常

如有任何帮助,我们将不胜感激!

这里没有意外发生。 pipconda 为他们的包使用不同的来源。 pip 始终检查 python-binance 可用的 PyPi。 conda 在配置的频道列表中查找包,在您的情况下,默认频道。但是,如果您检查 anaconda.org 上的 search function,您会发现该软件包只能从 conda-forge 获得,因此您可以使用

conda 安装它]
conda install -c conda-forge python-binance