PyVESC
PyVESC copied to clipboard
Cannot import name 'VESC' from 'pyvesc'
Hi, I'm trying to run your motor_example.py, but I 'm getting the error "cannot import name 'VESC' from 'pyvesc'." Any idea why this may be? I believe I'm working in python 3, but I'm new to coding in Python. Thanks!
Try installing the newest version of the library using:
pip install git+https://github.com/LiamBindle/PyVESC
hi i have the same problem :
pi@raspberrypi:~ $ pip3 install git+https://github.com/LiamBindle/PyVESC
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting git+https://github.com/LiamBindle/PyVESC
Cloning https://github.com/LiamBindle/PyVESC to /tmp/pip-req-build-m2xv4k34
Requirement already satisfied (use --upgrade to upgrade): pyvesc==1.0.5 from git+https://github.com/LiamBindle/PyVESC in /usr/local/lib/python3.7/dist-packages
Requirement already satisfied: crccheck in ./.local/lib/python3.7/site-packages (from pyvesc==1.0.5) (1.0)
Building wheels for collected packages: pyvesc
Running setup.py bdist_wheel for pyvesc ... done
Stored in directory: /tmp/pip-ephem-wheel-cache-imgiad77/wheels/98/57/5e/5cf496be02b66fe4f643351fb30d326009f1abd58aa90eda10
Successfully built pyvesc
pi@raspberrypi:~ $ python3 motor_example.py
Traceback (most recent call last):
File "motor_example.py", line 1, in
the same as sudo
@robbyatbln: What worked for me was to "pip remove" the pyvesc, delete everything pyvesc-related from the disk and then install again from newest source as @TannerGilbert suggested.
This worked for us:
pip uninstall PyCRC
pip install pythoncrc
Sadly I have pretty much given up on this library ( I have tried for 3 days) things I have tried
Virtual Machine Version Matching Docker
I have had zero luck, I have just defaulted to writing my program in C++.
I have pyvesc install yet I get the following messages (This is extremely irritating)
Documents/code/PyVESC/pyvesc/examples$ python3 motor_example.py
Traceback (most recent call last):
File "/home/mwesideveloper/Documents/code/PyVESC/pyvesc/examples/motor_example.py", line 1, in <module>
from pyvesc import VESC
ImportError: cannot import name 'VESC' from 'pyvesc' (/home/mwesideveloper/.local/lib/python3.10/site-packages/pyvesc/__init__.py)