sunfounder / SunFounder_PiCar-V

Smart Video Car Kit V2.0 for Raspberry Pi from SunFounder
GNU General Public License v2.0
111 stars 175 forks source link

Picar servo-install fail. #41

Open mlgaye opened 4 years ago

mlgaye commented 4 years ago

~/SunFounder_PiCar-V $ picar servo-install Traceback (most recent call last): File "/usr/local/bin/picar", line 11, in load_entry_point('SunFounder-PiCar==1.0.1', 'console_scripts', 'picar')() File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 561, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2631, in load_entry_point return ep.load() File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2291, in load return self.resolve() File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2301, in resolve raise ImportError(str(exc)) ImportError: 'module' object has no attribute 'main'

hannesa2 commented 3 years ago

I run with picar servo-install into

Traceback (most recent call last):
  File "/usr/local/bin/picar", line 11, in <module>
    load_entry_point('SunFounder-PiCar==1.0.1', 'console_scripts', 'picar')()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 561, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2631, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2291, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2297, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python3.5/dist-packages/SunFounder_PiCar-1.0.1-py3.5.egg/picar/__init__.py", line 3, in <module>
    from .import back_wheels
  File "/usr/local/lib/python3.5/dist-packages/SunFounder_PiCar-1.0.1-py3.5.egg/picar/back_wheels.py", line 15, in <module>
    from .SunFounder_TB6612 import TB6612
  File "/usr/local/lib/python3.5/dist-packages/SunFounder_PiCar-1.0.1-py3.5.egg/picar/SunFounder_TB6612/TB6612.py", line 13, in <module>
    import RPi.GPIO as GPIO
ImportError: No module named 'RPi'

The root cause was an error during

sudo python setup.py install with a resulting

sudo: python: command not found

I was able to fix it by using poyhon3

sudo apt-get install python3-RPi.GPIO

Sorry, currently I'm to much a python beginner, to solve it with install script pull request.