linux - Trouble importing libraries in Python 2.7 -
i'm new linux willing understand what's going on. spend lot of time on google trying solve problem myself time, don't it.
i'm running linux debian-pierre 3.16.0-4-686-pae #1 smp debian 3.16.7-ckt11-1+deb8u3 (2015-08-04) i686 gnu/linux
here problem: when importing libraries added myself (eg request, psutil, serial) in python script, :
traceback (most recent call last): file "/home/pierre/documents/script/xbee/comm.py", line 9, in <module> import serial file "/usr/local/lib/python2.7/site-packages/serial/__init__.py", line 21, in <module> serial.serialposix import * file "/usr/local/lib/python2.7/site-packages/serial/serialposix.py", line 15, in <module> import sys, os, fcntl, termios, struct, select, errno, time importerror: /usr/local/lib/python2.7/lib-dynload/select.so: undefined symbol: _pyint_asint i can't import them either when running python command line. modules stored in /usr/local/lib/python2.7/site-packages/.
sys.path gives:
[ '', '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7', '/usr/local/lib/python2.7/plat-linux3', '/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old', '/usr/local/lib/python2.7/lib-dynload', '/home/pierre/.local/lib/python2.7/site-packages', '/usr/local/lib/python2.7/site-packages' ] so path folder containing modules included. thing don't understand 1 of libraries in path can loaded while others not. i'm totally confused.
after rebuilding laptop installed version of python 2.7 because didn't know installed debian. problems started then. seems python doesn't fetch modules right place, why?
if can appreciated.
i built myself server (cubieboard) cubian on it, wrote scripts, installed libraries, use them without problem... i'm confused.
Comments
Post a Comment