Search code examples
pippycharmpackage

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


I am trying to install the Python-binance package to Pycharm, but it is not available for the conda interpreter that I use.

When I try to install it via 'conda install python-binance' in my terminal I get the following error:

(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.

Which is strange, because it installs fine when I run 'pip install python-binance'.

Any help would be much appreciated!

  • Thanks to Flying Teller's comments below I managed to install python-binance using conda. However, in my Python interpreter, which uses conda, python-binance still doesn't appear? (when I click the + sign and look for python-binance it is not there?)

enter image description here


Solution

  • There is nothing unexpected happening here. pip and conda use different sources for their packages. pip always checks PyPi on which python-binance is available. conda looks for packages in a list of configured channels, in you case, the default channels. But if you check with the search function on anaconda.org, you can see that the package is only available from conda-forge, so you can install it from conda using

    conda install -c conda-forge python-binance