bmoscon / cryptofeed

Cryptocurrency Exchange Websocket Data Feed Handler
Other
2.23k stars 686 forks source link

import cython file error #825

Closed IMTAIHUN closed 2 years ago

IMTAIHUN commented 2 years ago

I got an error with import cryptofeed. Error caused by feed.py file line 20. from cryptofeed.types import OrderBook types.pyx is a cython file, there is an import error. so I think adding some lines before importing types.pyx would be a solution.

in feed.py file, edit line 20 with

import pyximport 
pyximport.install() 
from cryptofeed.types import OrderBook

with this code, the problem is solved.

I'm using mac OS with apple silicon.

bmoscon commented 2 years ago

if using the code from source you have to build/install it first. you dont need to do what you have described here, you need to run something like python setup.py develop or python setup.py install