Tiny Core Linux
Tiny Core Extensions => TCE Talk => Topic started by: RAWeigel on February 23, 2019, 06:34:36 AM
-
Hi,
how do I run the SERIAL module in PYTHON 3.6?
In version 2.6, it's OK, but I'd like to use version 3.6 of PYTHON.
-
Hi RAWeigel
Your question sounds a little vague. What did you do in version 2.6 that worked? What error are you getting in version 3.6?
If you provide some information, someone may be able to help you.
-
Thanks for replying, Rich.
Sorry for the lack of details and simple questions, but I'm learning to use Linux.
For version 2.6, I installed pyserial and did a simple test in IDLE:
Python 2.7.14 (default, Mar 22 2018, 15:55:05)
[GCC 7.2.0] on linux2
Type "copyright", "credits" or "license()" for more information.
>>> from serial import*
>>>
Doing the same thing in the IDLE3 version:
Python 3.6.4 (default, Mar 9 2018, 13:17:33)
[GCC 7.2.0] on linux
Type "copyright", "credits" or "license()" for more information.
>>> from serial import*
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
from serial import*
ModuleNotFoundError: No module named 'serial'
>>>
My English is poor, so I got help from the Google translator. :-[
-
Hi RAWeigel
I suspect you'll find there are 2 problems. The pyserial extension uses:
/usr/local/lib/python2.7/site-packages/while python3.6 uses:
/usr/local/lib/python3.6/site-packages/The second possible problem is whether pyserial files are even compatible with python3.6.
-
Yes, pyserial runs in Windows + Python 3.x
Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 17:26:49) [MSC v.1900 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> from serial import*
>>>
I copy:
/usr/local/lib/python2.7/site-packages/serialTo:
/usr/local/lib/python3.6/site-packages/serial, but another error occurs:
Python 3.6.4 (default, Mar 9 2018, 13:17:33)
[GCC 7.2.0] on linux
Type "copyright", "credits" or "license()" for more information.
>>> from serial import*
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
from serial import*
File "/usr/local/lib/python3.6/site-packages/serial/__init__.py", line 21, in <module>
from serialposix import *
ModuleNotFoundError: No module named 'serialposix'
>>>
Yes, "serialposix" file exists at this location.
/Richard
-
Hi RAWeigel
Which brings us to this:
The second possible problem is whether pyserial files are even compatible with python3.6.
It's possible the /usr/local/lib/python2.7/site-packages/ path is hardcoded into the pyserial files.
-
Hi RAWeigel
You may need to download a newer version of pyserial from their website. I don't work in python myself but I believe I've
seen other members mention using a pip command to install other python programs. Try the search page:
http://forum.tinycorelinux.net/index.php?action=search
Set Search order: to Most recent topics first and enter python pip -pipe in the Search for: field to see if there are any
useful hints on installations.
-
py3.6serial posted, pyserial updated
Note that python extensions are specific to the major/minor versions of python that they were compiled for:
* pyserial, compiled on python-2.7.x will not work on python-2.6.x nor python3.x
* py3.6serial compiled on python-3.6.x will not work on python-3.5.x nor python2.x
-
py3.6serial posted, pyserial updated
Note that python extensions are specific to the major/minor versions of python that they were compiled for:
* pyserial, compiled on python-2.7.x will not work on python-2.6.x nor python3.x
* py3.6serial compiled on python-3.6.x will not work on python-3.5.x nor python2.x
Hi Juanito,
:) Thanks for the new update, but ... I still can not find this file.
I looked for several mirros.
Is there any specific mirror?
/Richard
-
It might take up to a day for the mirrors to update - the main repo is repo.tinycorelinux.net
-
It might take up to a day for the mirrors to update - the main repo is repo.tinycorelinux.net
I found! 8)
Installed, but ... it only run after copied the directory SERIAL:
/usr/local/lib/python3.6/site-packages/pyserial-3.2.1-py3.6.egg/serial
For:
/usr/local/lib/python3.6/site-packages/serial
Thanks @Juanito and @Rich
/Richard
-
adjusted py3.6serial posted