xwiimote / xwiimote-bindings

Language bindings for the xwiimote package
Other
24 stars 10 forks source link

build and install success but canot find module ? #12

Open diginfo opened 7 years ago

diginfo commented 7 years ago

Successfully built and installed however the module cannot be found:

Python 2.7.12 (default, Jun 28 2016, 08:31:05) 
[GCC 6.1.1 20160602] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import xwiimote
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "xwiimote.py", line 21, in <module>
    _xwiimote = swig_import_helper()
  File "xwiimote.py", line 20, in swig_import_helper
    return importlib.import_module('_xwiimote')
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named _xwiimote

Any ideas ?

EmmaGoodliffe commented 4 years ago

@diginfo I am having the same problem. Did you ever find a solution?

EmmaGoodliffe commented 4 years ago

The solution is that you have to run the file with sudo LD_LIBRARY_PATH=<prefix>/lib PYTHONPATH=<prefix>/lib/python2.7/site-packages python ./xwiimote.py rather than just python ./xwiimote.py. (<prefix> should be replaced /usr if you ran ./autogen.sh --prefix=/usr or simply left out if you ran ./autogen.sh without the prefix flag).