mitsuhiko / pipsi

pip script installer
Other
2k stars 133 forks source link

How to install pipsi on Raspbian #188

Open braselectron opened 5 years ago

braselectron commented 5 years ago

This is my 2¢ to help Raspbian users and this excellent project ("Linux sandbox strategies, the best way to protect your sanity")

How to install 'pipsi' on Raspbian (raspberry Pi)

REF: pipsi (https://github.com/mitsuhiko/pipsi)

----- STEP 1: First, check that you have virtualenv and python-venv installed

dpkg -l vitualenv python-venv

If it does not show them installed (ie. with a 'ii' .... then you need to install them)

If you need to install the packages, which usually does not come installed by default with Raspbian do this:

sudo apt install virtualenv

and/or install the python3-venv package too

sudo apt install python3-venv

----- STEP 2: Now lets follow the instruction at pipsi documentation, but we need to changing python for python3 at the 'curl' command, because Raspbian newer releases install the above packages for python3 (found this here reading the old issues), so do this:

curl https://raw.githubusercontent.com/mitsuhiko/pipsi/master/get-pipsi.py | python3

But if you get the following message,

Installing pipsi You need to have virtualenv installed to bootstrap pipsi

please check STEP 1 again.

NOTICE: you may need to run the 'curl' command twice (specially if you get erros at first run).

So if all goes well, check your virtual environment ~/.local directory, and it should show a big structure listing with many python sub-directories,

tree ~/.local

So now continue to follow the 'pipsi' instructions.

I tested this on a RPi3+ running a image of Raspbian, release 9.8, codename: stretch, originally downloaded from SDRplay as a Raspbian working image with SDRplay packages installed for RSP SDR radio (in my case the RSP2). I did a 'apt update' and 'upgrade' at before installing 'pipsi'

Why I did this ? Because I wanted to test other python codes with my RPi3+ and RSP2 without breaking the system installation.

cs01 commented 5 years ago

Thanks for the write up! Just a note -- pipsi is no longer maintained. pipx is an active alternative.

braselectron commented 5 years ago

Do need to uninstall all packages with pipsi and remove the installation to be able to upgrade to the new pipx ?

cs01 commented 5 years ago

I added a script to do the migration automatically.

https://pipxproject.github.io/pipx/faq/

https://raw.githubusercontent.com/pipxproject/pipx/master/scripts/migrate_pipsi_to_pipx.py