sphero-inc / sphero-sdk-raspberrypi-python

Sphero RVR SDK to run on Raspberry Pi using Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pip not installed on Raspian lite

p10tyr opened this issue · comments

I am working with Raspbian Lite fresh install.
After running first-time-setup and reboot the pipenv --python /usr/bin/python3.7 command comes back with error

-bash: -bash:: command not found

python -m pip install pipenv

So when it tries to run this python -m pip install pipenv from the first time script it says

no module pip found

I had to manually run sudo apt-get install python-pip and then manually run the install pip command

Is there something in the manual about not using Lite version? I must have missed it?

I then got errors about

ImportError: No module named functools_lru_cache

So i manually installed sudo apt-get install python-matplotlib which seemed to start making the virtual environment but then just blew up with

Creating a virtualenv for this project...
Pipfile: /home/pi/rvr/sphero-sdk-raspberrypi-python/Pipfile
Using /usr/bin/python3.7 (3.7.3) to create virtualenv...
⠇ Creating virtual environment...RuntimeError: failed to query /usr/bin/python3.7 with code 1 err: 'Traceback (most recent call last):\n File "/home/pi/.local/lib/python2.7/site-packages/virtualenv/discovery/py_info.py", line 16, in \n from distutils.command.install import SCHEME_KEYS\nModuleNotFoundError: No module named 'distutils.command'\n'
✘ Failed creating virtual environment
[pipenv.exceptions.VirtualenvCreationException]: File "/home/pi/.local/lib/python2.7/site-packages/pipenv/vendor/click/decorators.py", line 17, in new_func
[pipenv.exceptions.VirtualenvCreationException]: return f(get_current_context(), *args, **kwargs)
[pipenv.exceptions.VirtualenvCreationException]: File "/home/pi/.local/lib/python2.7/site-packages/pipenv/cli/command.py", line 208, in cli
[pipenv.exceptions.VirtualenvCreationException]: clear=state.clear,
[pipenv.exceptions.VirtualenvCreationException]: File "/home/pi/.local/lib/python2.7/site-packages/pipenv/core.py", line 574, in ensure_project
[pipenv.exceptions.VirtualenvCreationException]: pypi_mirror=pypi_mirror,
[pipenv.exceptions.VirtualenvCreationException]: File "/home/pi/.local/lib/python2.7/site-packages/pipenv/core.py", line 506, in ensure_virtualenv
[pipenv.exceptions.VirtualenvCreationException]: python=python, site_packages=site_packages, pypi_mirror=pypi_mirror
[pipenv.exceptions.VirtualenvCreationException]: File "/home/pi/.local/lib/python2.7/site-packages/pipenv/core.py", line 935, in do_create_virtualenv
[pipenv.exceptions.VirtualenvCreationException]: extra=[crayons.blue("{0}".format(c.err)),]
[pipenv.exceptions.VirtualenvCreationException]:
Failed to create virtual environment.

Hello @ppumkin,

We do need to point out in our documentation that we do not recommend using the Raspbian Lite as it's missing packages our setup process depends on. Thank you for bringing this to our attention.

Have you tried re-running our setup using a full version of Raspbian?

hey @acampos81

Raspbian (Buster) Lite works just fine with running:

sudo apt install python3-pip python-pip just before bash first-time-setup.sh 🥇

then @ppumkin you'd need to:

take all python3 modules from Pipfile and install them one by one:

sudo apt install python3-aiohttp python3-requests python3-websocket python3-serial-asyncio

then install the sdk:

sudo python3 setup.py install

and lastly everything will work like:

sudo python3 getting_started/observer/api_and_shell/echo.py

P.S. yeah, unfortunately you'd need to run them all with sudo now 💯