I have a script that imports mysql.connector
that works correctly from the idle, but when I try to execute them from the shell of the s.o. always throws me the error:
Traceback (most recent call last):
File "/home/pi/Projects/rasSerial.py", line 10, in < module >
import mysql.connector
ImportError: No module named mysql.connector
I run the script with its absolute path, I have tried to add the path of mysql with sys.path.append
but there is no way.
The variable PYTHONPATH
is not set with the correct values for the library to find me, if that was the solution.
Anyway, any idea is appreciated.
The environment is Raspbian, with Phyton 3.5.3 Server version: 10.1.23-MariaDB-9 + deb9u1 Raspbian 9.0