It now read from wrong package,it shall read from
Rename or delete python3.7/site-packages/
You could of course use virtual environment,it's build into Python and then will avoid conflict like this.
Example.
pyserial
and then sub-folder serial
.Rename or delete python3.7/site-packages/
serial
/ folder and try again.You could of course use virtual environment,it's build into Python and then will avoid conflict like this.
Example.
tom@tom:~$ python -m venv modem_env tom@tom:~$ cd modem_env/ tom@tom:~/modem_env$ source bin/activate (modem_env) tom@tom:~/modem_env$ pip install modem-cmd Collecting modem-cmd Downloading modem-cmd-1.0.2.tar.gz (2.2 kB) Collecting pyserial>=2.6 Downloading pyserial-3.5-py2.py3-none-any.whl (90 kB) |████████████████████████████████| 90 kB 1.6 MB/s Using legacy 'setup.py install' for modem-cmd, since package 'wheel' is not installed. Installing collected packages: pyserial, modem-cmd Running setup.py install for modem-cmd ... done Successfully installed modem-cmd-1.0.2 pyserial-3.5 (modem_env) tom@tom:~/modem_env$ python Python 3.9.6 (default, Aug 3 2021, 16:49:17) [GCC 7.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from modemcmd import modemcmd >>> >>> modecmd <function modemcmd at 0x7f6c98baaf70>