dmlc / minpy

NumPy interface with mixed backend execution
https://minpy.readthedocs.io/en/latest/
Other
1.11k stars 112 forks source link

How to install minpy and opencv correctly ? #177

Closed GerrieWell closed 7 years ago

GerrieWell commented 7 years ago

I followed this page to install minpy . After that ,it seem like install in virtual environment. if I run workon minpy_dev python -c 'import minpy.numpy as np' work fine. But

 python -c 'import cv2' 
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named cv2

If I don't run workon minpy_dev .opencv work fine .but minpy module can't be found .How to fix that ?

GerrieWell commented 7 years ago

without the environment :

➜  ~  $  python -c 'import minpy'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/minpy/__init__.py", line 50, in <module>
    check_mxnet_version()
  File "/usr/local/lib/python2.7/site-packages/minpy/__init__.py", line 39, in check_mxnet_version
    current = tuple(int(v) for v in mx.__version__.split("."))
  File "/usr/local/lib/python2.7/site-packages/minpy/__init__.py", line 39, in <genexpr>
    current = tuple(int(v) for v in mx.__version__.split("."))
ValueError: invalid literal for int() with base 10: '3a3'
➜  ~  $ python -c 'import cv2'
Taco-W commented 7 years ago

@GerrieWell Could you please try the latest minpy version by sudo pip install minpy --upgrade? The minpy/init.py file has been changed since the issue.

GerrieWell commented 7 years ago

Yes . I've solved it .