sphero-inc / sphero-sdk-raspberrypi-python

Sphero RVR SDK to run on Raspberry Pi using Python
Other
78 stars 52 forks source link

pip not installed on Raspian lite #9

Closed p10tyr closed 2 years ago

p10tyr commented 4 years ago

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

https://github.com/sphero-inc/sphero-sdk-raspberrypi-python/blob/522ee139a6042e93cbbf13b70d0fb2d4d38a9763/first-time-setup.sh#L20

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?

p10tyr commented 4 years ago

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: File "/home/pi/.local/lib/python2.7/site-packages/pipenv/core.py", line 574, in ensure_project

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: Failed to create virtual environment.

acampos81 commented 4 years ago

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?

cipy commented 4 years ago

hey @acampos81

Raspbian (Buster) Lite works just fine with running:

sudo apt install python3-pip python-pip just before bash first-time-setup.sh πŸ₯‡

cipy commented 4 years ago

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 πŸ’―

p10tyr commented 4 years ago

Excellent thanks a lot guys.

Yea i usually just use Lite for messing around. I did go back to check the docs if lite was recommended and I guess it’s not unless you feel very comfortable with working out the missing steps your self.

By the looks of the steps by Ciprian it’s not really that much work (after they figured it all out thanks πŸ‘πŸ‘) so you could have a advanced bit not recommends guide too now. If you want to save the extra gigabytes I guess ?

I did go and just download your Raspbian and the SDK worked on my Rvr just great. I personally would like to use dot lent core as I don’t know Python that well. But I am able to hack around now. Thanks a lot for the help


From: Ciprian Manea notifications@github.com Sent: Tuesday, February 18, 2020 10:00:17 PM To: sphero-inc/sphero-sdk-raspberrypi-python sphero-sdk-raspberrypi-python@noreply.github.com Cc: Piotr Kula piotr@kula.solutions; Mention mention@noreply.github.com Subject: Re: [sphero-inc/sphero-sdk-raspberrypi-python] pip not installed on Raspian lite (#9)

then @ppumkinhttps://github.com/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 πŸ’―

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/sphero-inc/sphero-sdk-raspberrypi-python/issues/9?email_source=notifications&email_token=AAJRDEYX3IFVKX63BVJVJGTRDRK7DA5CNFSM4KSVWH72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMFQGYI#issuecomment-587924321, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAJRDEYLQJETONJLUWL46ZLRDRK7DANCNFSM4KSVWH7Q.