Iv'e had some success running some basic python code on Raspup. I would like to add a module using pip. A search on PPM brings up python-pip_18.1-5 and it appears to be installed, however "python -m pip version" in terminal returns ~ usr//bin/python: No module named pip. Raspup has Python version 2.7.16 so pip needs to be bootstrapped but my attempts are not working.
How to add pip to Python?
Moderator: Forum moderators
- snoring_cat
- Posts: 206
- Joined: Tue Sep 21, 2021 3:40 pm
- Location: Earth
- Has thanked: 24 times
- Been thanked: 46 times
Re: How to add pip to Python?
Hi parapup,
pip should be able to be run by itself, without having to start it with python. Below is an example of it being used on Puppy Linux Fossa 64
Code: Select all
pip --version
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
pip install socks
Collecting socks
Downloading socks-0.tar.gz (618 bytes)
Building wheels for collected packages: socks
Building wheel for socks (setup.py) ... done
Created wheel for socks: filename=socks-0-py3-none-any.whl size=995 sha256=1215fe95ba42239a60b25c930370bce2c5d570d8fbb11876ca8a82c937ded348
Stored in directory: /root/.cache/pip/wheels/f4/d2/15/1266e76101e7deac862456ded4c0247b676c5f5168e03bab26
Successfully built socks
Installing collected packages: socks
Successfully installed socks-0
Re: How to add pip to Python?
Thanks snoring_cat,
But...
pip --version ->returns
bash: pip: command not found
So I guess pip is not installed. I have to work on that.
- rockedge
- Site Admin
- Posts: 6543
- Joined: Mon Dec 02, 2019 1:38 am
- Location: Connecticut,U.S.A.
- Has thanked: 2749 times
- Been thanked: 2624 times
- Contact:
Re: How to add pip to Python?
Open the PPM again and search for python-pip_18.1-5 and select it again then attempt to install it. Good chance the PPM is saying it's installed when it is not. Remember the pip has to match the python 2.7 version.
See if this helps
- mikeslr
- Posts: 2963
- Joined: Mon Jul 13, 2020 11:08 pm
- Has thanked: 178 times
- Been thanked: 917 times
Re: How to add pip to Python?
Sort of 'off-topic'. But is there a pip-package(?) that can do what ListDD does with respect to binaries, that is produce an out-put file indicating what python packages are 'missing' from one's application constructed using python?