Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot import name 'VESC' from 'pyvesc' #20

Open
MarTru21 opened this issue Mar 22, 2021 · 5 comments
Open

Cannot import name 'VESC' from 'pyvesc' #20

MarTru21 opened this issue Mar 22, 2021 · 5 comments

Comments

@MarTru21
Copy link

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!

@TannerGilbert
Copy link

Try installing the newest version of the library using:

pip install git+https://github.com/LiamBindle/PyVESC

@robbyatbln
Copy link

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
from pyvesc import VESC
ImportError: cannot import name 'VESC' from 'pyvesc' (/usr/local/lib/python3.7/dist-packages/pyvesc/init.py)
pi@raspberrypi:~ $

the same as sudo

@FrenkK
Copy link

FrenkK commented May 18, 2021

@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.

@nakai-omer
Copy link

This worked for us:

pip uninstall PyCRC
pip install pythoncrc

@moeec
Copy link

moeec commented Nov 24, 2023

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants