installation issue (windows)
Serpens66 opened this issue · 11 comments
I just tried to install your module, but got this error:
PS C:> pip3.4 install bittrex-websocket
Collecting bittrex-websocket
Using cached bittrex_websocket-0.0.7.0-py2.py3-none-any.whl
Requirement already satisfied: websocket-client>=0.47.0 in c:\python34\lib\site-packages (from bittrex-websocket)
Requirement already satisfied: cfscrape>=1.9.4 in c:\python34\lib\site-packages (from bittrex-websocket)
Collecting gevent>=1.3a1 (from bittrex-websocket)
Using cached gevent-1.3a2-cp34-cp34m-win32.whl
Requirement already satisfied: signalr-client==0.0.7 in c:\python34\lib\site-packages (from bittrex-websocket)
Collecting wsaccel>=0.6.2 (from bittrex-websocket)
Using cached wsaccel-0.6.2.tar.gz
Requirement already satisfied: requests[security]==2.18.4 in c:\python34\lib\site-packages (from bittrex-websocket)
Requirement already satisfied: Events==0.3 in c:\python34\lib\site-packages (from bittrex-websocket)
Requirement already satisfied: six in c:\python34\lib\site-packages (from websocket-client>=0.47.0->bittrex-websocket)
Requirement already satisfied: PyExecJS>=1.4.0 in c:\python34\lib\site-packages (from cfscrape>=1.9.4->bittrex-websocket
)
Collecting greenlet>=0.4.13; platform_python_implementation == "CPython" (from gevent>=1.3a1->bittrex-websocket)
Using cached greenlet-0.4.13-cp34-cp34m-win32.whl
Requirement already satisfied: sseclient in c:\python34\lib\site-packages (from signalr-client==0.0.7->bittrex-websocket
)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in c:\python34\lib\site-packages (from requests[security]==2.18.4->
bittrex-websocket)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\python34\lib\site-packages (from requests[security]==2.18.4->
bittrex-websocket)
Requirement already satisfied: certifi>=2017.4.17 in c:\python34\lib\site-packages (from requests[security]==2.18.4->bit
trex-websocket)
Requirement already satisfied: idna<2.7,>=2.5 in c:\python34\lib\site-packages (from requests[security]==2.18.4->bittrex
-websocket)
Requirement already satisfied: cryptography>=1.3.4; extra == "security" in c:\python34\lib\site-packages (from requests[
security]==2.18.4->bittrex-websocket)
Requirement already satisfied: pyOpenSSL>=0.14; extra == "security" in c:\python34\lib\site-packages (from requests[secu
rity]==2.18.4->bittrex-websocket)
Requirement already satisfied: cffi>=1.7; platform_python_implementation != "PyPy" in c:\python34\lib\site-packages (fro
m cryptography>=1.3.4; extra == "security"->requests[security]==2.18.4->bittrex-websocket)
Requirement already satisfied: asn1crypto>=0.21.0 in c:\python34\lib\site-packages (from cryptography>=1.3.4; extra == "
security"->requests[security]==2.18.4->bittrex-websocket)
Requirement already satisfied: pycparser in c:\python34\lib\site-packages (from cffi>=1.7; platform_python_implementatio
n != "PyPy"->cryptography>=1.3.4; extra == "security"->requests[security]==2.18.4->bittrex-websocket)
Building wheels for collected packages: wsaccel
Running setup.py bdist_wheel for wsaccel ... error
Complete output from command c:\python34\python.exe -u -c "import setuptools, tokenize;file='C:\Users\SERPEN1\1\AppData\Local\Tem
AppData\Local\Temp\pip-build-zr6bilna\wsaccel\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().r
eplace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d C:\Users\SERPEN
p\tmp47k6x4depip-wheel- --python-tag cp34:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.4
creating build\lib.win32-3.4\wsaccel
copying wsaccel_init_.py -> build\lib.win32-3.4\wsaccel
running build_ext
building 'wsaccel.utf8validator' extension
error: INCLUDE environment variable is empty
Failed building wheel for wsaccel
Running setup.py clean for wsaccel
Failed to build wsaccel
Installing collected packages: greenlet, gevent, wsaccel, bittrex-websocket
Found existing installation: greenlet 0.4.12
Uninstalling greenlet-0.4.12:
Successfully uninstalled greenlet-0.4.12
Found existing installation: gevent 1.2.2
Uninstalling gevent-1.2.2:
Successfully uninstalled gevent-1.2.2
Running setup.py install for wsaccel ... error
Complete output from command c:\python34\python.exe -u -c "import setuptools, tokenize;file='C:\Users\SERPEN11\AppData\Local
\AppData\Local\Temp\pip-build-zr6bilna\wsaccel\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read()
.replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\SERPEN
\Temp\pip-egg59y1n-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-3.4
creating build\lib.win32-3.4\wsaccel
copying wsaccel_init_.py -> build\lib.win32-3.4\wsaccel
running build_ext
building 'wsaccel.utf8validator' extension
error: INCLUDE environment variable is empty
----------------------------------------
Command "c:\python34\python.exe -u -c "import setuptools, tokenize;file='C:\Users\SERPEN1\AppData\Local\Temp\1\AppData\Local\Temp\pip-egg59y1n-recor
pip-build-zr6bilna\wsaccel\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f
.close();exec(compile(code, file, 'exec'))" install --record C:\Users\SERPEN
d\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\SERPEN~1\AppDat
a\Local\Temp\pip-build-zr6bilna\wsaccel\
Perhaps you need a compiler. Your error is related to error: INCLUDE environment variable is empty
.
Googling it yields lots of solutions.
since it is the "wsaccel" module, I searched in issues of it:
methane/wsaccel#12
I don't know what wheels are, but indeed I'm trying to install on windows (windows powershell), so I guess windows and the missing "wheels" are the problem? Somewhere someone wrote "activate environment" but I have no clue what that means and googling it yields stuff that is far beyond knowledge of any beginner and even advanced I guess ...
edit:
Installing on Debian works fine.
hm googling for "pip windows failed building wheel" indead yields that one should use a compiler, since there are conflicts with C libraries on windows otherwise...
I have no knowledge with compilers and even pip is sometimes to complicated (pip/pip3.4/pip3.. never know what to use). From what I found about "python 3 visual compiler windows" it looks very very complicated?! Isn't there an easier way?
Why do you need wsaccel in your script? The connection to bittrex WS also works without I'm sure.
you don't use wsaccel in your scripts... and in the descriptino of the wsaccel module is written, that it changes authobahn and ws4py ? So does it also affect my other scripts and modules that make use of those two when I install wsaccel ?!
btw newest version of ws4py does not work well, I'm using an old version wich still works.
Check
https://wiki.python.org/moin/WindowsCompilers
It is not complicated but requires some reading on your behalf. The most you have to do is to install a compiler.
I get the same error when I do "pip3.4 install wsaccel", so the problem is installing wsaccel on windows.
Still I would like to know what it does exactly in your module, since it is not imported anywhere.
Btw did you already noticed the BETA of bittrex? They released beta WS, even with authenticated part. Guess you are already working on implementing it? :) https://github.com/Bittrex/beta
Thanks for the compiler thing. But I fear it is too complicated for me. If everything goes wrong, I will test instead on Debian, there it works.
Hi, I wasn't aware that they have published this article, so thanks for the info :)!
Regarding wsaccel, lol, the import got omitted somewhere in the commits. Thanks for the notification.
Regarding the installation, as I said you are not having problems with wsaccel specifically but with compiling. You can use versions prior to 0.0.7.0, they don't have wsaccel; or just remove it from the requirements and install the socket locally.
A final note: I am happy to help you with socket related bugs, however as I can see you seem to be new to coding/developing with Python. So if you plan to trade using the socket, I highly advise against it before you learn the basics.
Best,
Stan
thank you.
I'm already a bot trader (self written) since 4 years, but only with REST API and a bit ws4py. I'm new to signalR and wsaccel and yes I don't have deeper knowledge about python/programming, since I'm no programmer, I just tought myself the most important stuff, to know only the stuff I directly need for the bot. So my motto usually is "I don't want to know how it works (deeper knowledge), but I want it to work" xD
But I know alot about various exchanges and their pecularities regarding REST API.
I think for ws4py I found the code to use it:
from ws4py.client.threadedclient import WebSocketClient
try:
import wsaccel
wsaccel.patch_ws4py() # for ws4py. speeds up websocket
except: # if not installed
pass
But you don't use ws4py nor autobahn.
Anyway. The main goal here is to learn from your module how to use signalR correctly in my own application. That's why I did not install it previously but looked at the code. I already found the proper "subscribe_to_orderbook" function, but your module is too complex to understand it from reading. So I guess next step is testing your module at debian.
Thank you very much for your help and work :)
Importing wsaccel should be sufficient, however I am considering to remove it altogether because the socket doesn't send so many requests anyway.
If you want to learn about SignalR you should use the official documentation. The library I am using is a simple client. The socket seems complex because it's multithreaded and performs more than one task such as connecting, allocating subscriptions to threads, monitoring disconnection etc...
Anyway, feel free to close the issue if it's all solved for you.