binares / uxs Goto Github PK
View Code? Open in Web Editor NEWA unified crypto exchange websocket
A unified crypto exchange websocket
I just installed uxs using the following command: sudo pip3 install uxs
The installation was successful so I wanted to try it out.
$ ipython3
In [1]: import uxs
...
ModuleNotFoundError: No module named 'tkinter'
Of course the sollution is simple sudo apt install python3-tk
, but I thought I'll let you know.
I'm trying to work with uxs on MacOS but I fell at the first hurdle!
import uxs
Results in:
ModuleNotFoundError: No module named 'AppKit'
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-7527588d0428> in <module>
----> 1 import uxs
~/.pyenv/versions/3.9.4/lib/python3.9/site-packages/uxs/__init__.py in <module>
5 import yaml
6
----> 7 from uxs.base.socket import (ExchangeSocket, ExchangeSocketError)
8
9 from uxs.base.ccxt import (get_name, get_exchange, get_sn_exchange, init_exchange,
~/.pyenv/versions/3.9.4/lib/python3.9/site-packages/uxs/base/socket/__init__.py in <module>
----> 1 from .exchange import ExchangeSocket
2 from .errors import (ExchangeSocketError, ConnectionLimit)
3 from .orderbook import OrderbookMaintainer
~/.pyenv/versions/3.9.4/lib/python3.9/site-packages/uxs/base/socket/exchange.py in <module>
10 td = datetime.timedelta
11
---> 12 from ..auth import get_auth2, EXTRA_TOKEN_KEYWORDS
13 from ..ccxt import init_exchange, _ccxtWrapper
14 from .. import poll
~/.pyenv/versions/3.9.4/lib/python3.9/site-packages/uxs/base/auth.py in <module>
7 dt = datetime.datetime
8
----> 9 from ._settings import get_setting, set as _set
10
11 from fons.crypto import password_encrypt, password_decrypt
~/.pyenv/versions/3.9.4/lib/python3.9/site-packages/uxs/base/_settings.py in <module>
22 }
23
---> 24 APPDATA_DIR = get_appdata_dir('uxs-python', make=True)
25 SETTINGS_PATH = os.path.join(APPDATA_DIR, 'settings.yaml')
26 SETTINGS = {
~/.pyenv/versions/3.9.4/lib/python3.9/site-packages/fons/os.py in get_appdata_dir(appname, windows_select, make)
158
159 if _PLATFORM == 'Darwin':
--> 160 from AppKit import NSSearchPathForDirectoriesInDomains
161 # http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Functions/Reference/reference.html#//apple_ref/c/func/NSSearchPathForDirectoriesInDomains
162 # NSApplicationSupportDirectory = 14
ModuleNotFoundError: No module named 'AppKit'
Obviously attempted to install AppKit but the listing on PyPI was last updated 2014 and the GitHub project page no longer exists. This didn't work
An answer StackOverflow suggested installing PyObjC. Initially this didn't work, then a subsequent Google search revealed that the NSSearchPathForDirectoriesInDomains
method is in the Foundation
module (which presumably got imported with PyObjC
).
I finally managed to import uxs
by editing line 160 of the file ~/.pyenv/versions/3.9.4/lib/python3.9/site-packages/fons/os.py
(see above traceback) to read from Foundation import NSSearchPathForDirectoriesInDomains
I'm completely new to Python so I'm afraid I don't know enough to understand who takes ownership of the above os.py file and whether my issue needs to bubble up to a different project!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.