sammchardy / python-binance

Binance Exchange API python implementation for automated trading
https://python-binance.readthedocs.io/en/latest/
MIT License
5.98k stars 2.2k forks source link

No way to install python-binance on Anaconda to work with Spyder ! Any idea ? #508

Open frenchdevartist opened 4 years ago

frenchdevartist commented 4 years ago

pip doesn't work with spyder IDE and conda install doesn't know python-binance package.

Is there any solution to install python-binance with conda in order to work with this package in Spyder IDE, which is the best for any scientific python program ?

Thanks for your help.

oliver-zehentleitner commented 4 years ago

you can download this repo and put it into your project. then import it.... what you lose are updates with a packages manager. nothing more.

al91liwo commented 4 years ago

You can install pip with conda and then install python-binance with the pip-package from your environment.

Example:

conda create -n binance_env
# or your environment name
source activate binance_env
# you need to insert your anaconda path. You the path with `whereis anaconda`
/YOUR_ANACONDA_PATH/envs/binance_env/bin/pip install python-binance
LYERO7 commented 4 years ago

you can install twisted from conda “conda install twisted”, then you can run the pip command pip install python-binance

jehoiakimkingne commented 3 years ago

Installing twisted from conda “conda install twisted”, then running the pip command pip install python-binance worked for me !

Thanks a lot !

victorkingi commented 3 years ago

This isn't a spyder IDE solution!

Here is something stupid I forgot to do. If you are using Jupyter notebook and Conda environments, make sure the kernel selected is the conda environment having the packages installed, otherwise, it will use the default system python which doesn't have any packages.

After opening a notebook, go to Kernel then change kernel image

If your conda environment isn't listed, follow this steps:

  1. Run conda install -c anaconda ipykernel . You might need to run as administrator in windows 10/11
  2. Run python -m ipykernel install --user --name=firstEnv where firstEnv is your environment name.
  3. Restart jupyter notebook and you should now have a new kernel under change kernel with your conda env name.

Cheers! :)