No module named binance client

ModuleNotFoundError: No module named ‘binance.websockets’ #819

Comments

effective-ai commented May 5, 2021 •

Describe the bug
ModuleNotFoundError: No module named ‘binance.websockets’

To Reproduce
from binance.websockets import BinanceSocketManager

Environment (please complete the following information):

  • Python version: 3.8.5
  • Virtual Env: [e.g. virtualenv, conda]
  • OS: Ubuntu 20
  • python-binance version = 1.0.4

aiohttp 3.7.4.post0
argon2-cffi 20.1.0
async-generator 1.10
async-timeout 3.0.1
attrs 20.2.0
backcall 0.2.0
bleach 3.2.1
brotlipy 0.7.0
certifi 2020.6.20
cffi 1.14.3
chardet 3.0.4
convertdate 2.3.2
cryptography 3.1.1
cycler 0.10.0
Cython 0.29.21
dateparser 1.0.0
decorator 4.4.2
defusedxml 0.6.0
entrypoints 0.3
ephem 3.7.7.1
fbprophet 0.7.1
hijri-converter 2.1.1
holidays 0.11.1
idna 2.10
importlib-metadata 2.0.0
ipykernel 5.3.4
ipython 7.18.1
ipython-genutils 0.2.0
ipywidgets 7.5.1
jedi 0.17.2
Jinja2 2.11.2
joblib 0.17.0
json5 0.9.5
jsonschema 3.2.0
jupyter-client 6.1.7
jupyter-core 4.6.3
jupyterlab 2.2.6
jupyterlab-pygments 0.1.2
jupyterlab-server 1.2.0
kiwisolver 1.2.0
korean-lunar-calendar 0.2.1
llvmlite 0.36.0
LunarCalendar 0.0.9
lxml 4.6.1
MarkupSafe 1.1.1
matplotlib 3.3.1
mistune 0.8.4
mkl-fft 1.2.0
mkl-random 1.1.0
mkl-service 2.3.0
multidict 5.1.0
multitasking 0.0.9
nbclient 0.5.1
nbconvert 6.0.7
nbformat 5.0.8
nest-asyncio 1.4.1
notebook 6.1.4
numba 0.53.1
numpy 1.19.1
olefile 0.46
opencv-python 4.5.1.48
packaging 20.4
pandas 1.1.3
pandocfilters 1.4.2
parso 0.7.0
pathlib 1.0.1
pexpect 4.8.0
pickleshare 0.7.5
Pillow 8.0.0
pip 20.2.4
plotly 4.14.3
prometheus-client 0.8.0
prompt-toolkit 3.0.8
psutil 5.8.0
ptyprocess 0.6.0
pycparser 2.20
pydot 1.4.2
pydotplus 2.0.2
Pygments 2.7.1
PyMeeus 0.5.10
pyOpenSSL 19.1.0
pyparsing 2.4.7
pyrsistent 0.17.3
PySocks 1.7.1
pystan 2.18.0.0
python-binance 1.0.4
python-dateutil 2.8.1
python-decouple 3.4
pytz 2020.1
pyzmq 19.0.2
regex 2021.4.4
requests 2.25.1
retrying 1.3.3
scikit-learn 0.23.2
scipy 1.5.2
seaborn 0.11.0
Send2Trash 1.5.0
setuptools 50.3.0.post20201006
sip 4.19.24
six 1.15.0
terminado 0.9.1
testpath 0.4.4
threadpoolctl 2.1.0
tornado 6.0.4
tqdm 4.50.2
traitlets 5.0.5
typing-extensions 3.10.0.0
tzlocal 2.1
ujson 4.0.2
urllib3 1.25.11
wcwidth 0.2.5
webencodings 0.5.1
websockets 9.0.1
wheel 0.35.1
widgetsnbextension 3.5.1
yarl 1.6.3
yfinance 0.1.59
zipp 3.3.1

Читайте также:  Год образования криптовалюты umi

The text was updated successfully, but these errors were encountered:

Источник

ImportError: cannot import name ‘Client’ #116

Comments

queezyy commented Jan 14, 2018

In my screenshot below you can see i successfully installed python-binance (via pip), but when i run my script, it is not recognizing your module. I am using «from binance.client import Client»

The text was updated successfully, but these errors were encountered:

iero commented Jan 18, 2018

Missing those lines in init.py file

from binance import client
from binance import depthcache
from binance import enums
from binance import exceptions
from binance import websockets

queezyy commented Jan 18, 2018 •

Thanks for the response.
I added those lines to \Lib\site-packages\binance\__init__.py, but still not working.
Also, __init__.py in the code base on this site is blank. Why wouldn’t he include those lines in the base code?
Most modules run fine after a pip install, not seeing why an ini file would need updating. It’s also not in his instructions.

queezyy commented Jan 19, 2018

I am starting to think it is because i had another Python Binance wrapper installed.
https://github.com/cnfuyu/python-binance-api

I am going to work to make sure this module is completely removed and then re-install Sams.

sammchardy commented Jan 19, 2018

Hi @queezyy if you can it may help to use a python environment like virtualenv to install packages into. This keeps things separated, you will run into issues like this if you start to install packages globally.

boctulus commented May 24, 2021 •

Same problem here !! It suddently failed

You can’t perform that action at this time.

Читайте также:  Централизованные источники финансирования инвестиций это

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

python-binance installed but cannot import? #252

Comments

wooxwoo commented Apr 15, 2018

i have installed python-binance by using
pip install python-binance

however when i try to :
from binance.client import Client

it cannot seem to reference it at all..
running python 3.6
win 7s

I have tried uninstalling and reinstalling everything not working

The text was updated successfully, but these errors were encountered:

AnderUstarroz commented Apr 15, 2018 •

Try the following:

It should print the path to the python-binance module, in my case would be:
/path-to-my-project/env/lib/python3.6/site-packages/binance/__init__.py

If the path is pointing to other folder that’s probably because you have created a folder called /binance within your project. If that’s the case you simply need to rename that folder.

wooxwoo commented Apr 16, 2018

it isnt pointing to any path:
«No module named ‘binance'»

i found the file it has saved it to by following the cmd download path and just copied it to my IDE package folder but i cant seem to access it with my IDE, pycharm, it even shows up in my pycharm modules but when i go to import it doesnt work because there doesnt seem to be a .py file under the same name.

is there a way to download the wrapper from a website and just drag drop the files in?
anyone got any solutions?

wooxwoo commented Apr 17, 2018

i was able to just copy source code and pretty much name my own .py file and use it as normal. thank u Sam McHardy for this!

Источник

Почему я получаю эту ошибку «ModuleNotFoundError: нет модуля с именем» binance.client «; ‘binance’ не является пакетом ‘после установки binance?

Я использую код Visual Studio, чтобы попытаться вытащить свечи из binance, но продолжаю получать следующую ошибку:

вот строка кода, вызывающая ошибку:

Я убедился, что я установил python-binance на правильную версию python, и из того, что я прочитал, я предполагаю, что что-то не так с путем, но я не уверен, что искать. Я запустил следующий код, проверьте путь

Читайте также:  Риск доходность ликвидность тест

это был мой результат

Я читал, что наличие файлов с именем binance.py может с ним испортить, но это имя было дано при загрузке. Если вам интересно, как это выглядит, вот оно:

Любая помощь или предложения приветствуются, спасибо!

5 ответов

Я изменил имя своей папки с «binance» на «binance_mod», и это решило проблему. Я считаю, что ошибка связана с папкой binance и файлом binance.py, находящимися в пакетах сайтов.

оттуда я только что сделал

и у меня не было проблем

Я решил это, используя conda специально для установки twisted: (другие источники не работали)

Удалить, переустановить, обновить.

python -m pip удалить python-binance

python -m pip установить python-binance

python -m pip install —upgradepython-binance

2. Похоже, что ваш файл binance.py, который вы пишете, находится в ваших пакетах сайта. Когда вы установили python-binance, в ваших пакетах сайта была создана папка под названием binance

Вы можете переместить файл, над которым работаете, или переименовать файл, над которым вы работаете.

Источник

Error (ImportError: No module named ‘_strptime’) when running program packaged by pyinstaller or cx-Freeze #220

Comments

wattwei commented Mar 22, 2018

Traceback (most recent call last):
File «C:\Python36-32\lib\site-packages\cx_Freeze\initscripts_startup_.py», line 14, in run
module.run()
File «C:\Python36-32\lib\site-packages\cx_Freeze\initscripts\Console.py», line 26, in run
exec(code, m.dict)
File «main.py», line 2, in
File «C:\binance\mainWindow.py», line 7, in
from worker import Worker
File «C:\binance\worker.py», line 6, in
from binance.client import Client, BinanceAPIException
File «C:\Python36-32\lib\site-packages\binance\client.py», line 8, in
from .helpers import date_to_milliseconds, interval_to_milliseconds
File «C:\Python36-32\lib\site-packages\binance\helpers.py», line 3, in
import dateparser
File «C:\Python36-32\lib\site-packages\dateparser_init_.py», line 4, in
from .date import DateDataParser
File «C:\Python36-32\lib\site-packages\dateparser\date.py», line 13, in
from dateparser.date_parser import date_parser
File «C:\Python36-32\lib\site-packages\dateparser\date_parser.py», line 11, in
from .parser import parse
File «C:\Python36-32\lib\site-packages\dateparser\parser.py», line 10, in
from dateparser.utils.strptime import strptime
File «C:\Python36-32\lib\site-packages\dateparser\utils\strptime.py», line 55, in
__strptime = patch_strptime()
File «C:\Python36-32\lib\site-packages\dateparser\utils\strptime.py», line 26, in patch_strptime
‘strptime_patched’, *imp.find_module(‘_strptime’)
File «C:\Python36-32\lib\imp.py», line 297, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named ‘_strptime’

The text was updated successfully, but these errors were encountered:

Источник

Оцените статью