Giter Club home page Giter Club logo

uxs's People

Contributors

binares avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

uxs's Issues

ModuleNotFoundError after installing uxs using pip3

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.

Problem importing uxs on MacOS

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.