Skip to content

ImportError: cannot import name 'VERSION' from 'serial' (unknown location) #235

Answered by eblot
dichaos asked this question in Q&A
Discussion options

You must be logged in to vote

Should be something like:

> python3
Python 3.8.6 (default, Nov 21 2020, 23:20:31)
[Clang 12.0.0 (clang-1200.0.32.27)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import serial
>>> serial.VERSION
'3.5'
>>> serial.__file__
'/usr/local/lib/python3.8/site-packages/serial/__init__.py'

Try uninstalling pyserial and check that import serial fails with an ImportError.

Bw sure you do no have a serial.py somewhere in your PYTHONPATH that could be imported instead of pyserial's.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@dichaos
Comment options

Comment options

You must be logged in to vote
1 reply
@dichaos
Comment options

Answer selected by eblot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants