-
Notifications
You must be signed in to change notification settings - Fork 377
ImportError: No module named lixian_commands.util #436
Comments
Against this change.... and this is a non-issue. This is not the correct way to do it. It should not be assumed that xunlei-lixian will be installed to If you intend to this , you should append "/usr/share/xunlei-lixian" to PYTHONPATH in your shell environment. moving lx executable to /bin is just plain wrong, you should symlink it instead. |
I agree that it should be site-wide where xunlei-lixian would be installed. The issue is that, I'm not familiar with Python, and when I follow the README instruction provided, I encountered the error message. It took me a while to figure out it was a "path" issue and I was not aware of PYTHONPATH until you mentioned it. At least, it should be a "setup" step to append the xunlei-lixian path to the environment variable PYTHONPATH before linking xunlei-lixian_cli.py to /bin/lx and attempting to execute it, or, provide a clear HowTo instruction for Python novice users. |
$ lx
Traceback (most recent call last):
File "/bin/lx", line 3, in
from lixian_commands.util import *
ImportError: No module named lixian_commands.util
to fix this issue, I have to modify lixian_cli.py a little bit:
!/usr/bin/env python
import sys
define base path, where the path has to be adapted to the real directory
sys.path.append('/usr/share/xunlei-lixian')
from lixian_commands.util import *
import lixian_help
The text was updated successfully, but these errors were encountered: