How to use pip install in ubuntu?
python - pip install from git repo branch - Stack Overflow
python3 - What is the Right Way to install pip3 on Ubuntu? - Unix & Linux Stack Exchange
Use Python3-pip
Here's a bit of a noob question...
I'm trying to build a git package using Ubuntu in terminal ( https://github.com/45Drives/cockpit-zfs/ )
One of the steps is to run pip3 install Cython==0.29.35
However, I can't do that because error: externally-managed-environment
And it suggests
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip
Only, how can I make that work, given that all the config files just assume regular python3?
The indicated steps to build the package are:
dnf install libzfs5-devel python3-devel -y
pip3 install Cython==0.29.35
git clone https://github.com/45Drives/python3-libzfs.git && cd python3-libzfs
./configure --prefix=/usr
make
make install
Prepend the url prefix git+ (See VCS Support):
Use with AIpip install git+https://github.com/tangentlabs/django-oscar-paypal.git@issue/34/oscar-0.6
And specify the branch name without the leading /.
Using pip with git+ to clone a repository can be extremely slow (test with https://github.com/django/django@stable/1.6.x for example, it will take a few minutes). The fastest thing I've found, which works with GitHub and BitBucket, is:
Use with AIpip install https://github.com/user/repository/archive/branch.zip
which becomes for Django master:
Use with AIpip install https://github.com/django/django/archive/master.zip
for Django stable/1.7.x:
Use with AIpip install https://github.com/django/django/archive/stable/1.7.x.zip
With BitBucket it's about the same predictable pattern:
Use with AIpip install https://bitbucket.org/izi/django-admin-tools/get/default.zip
Here, the master branch is generally named default.
This will make your requirements.txt installing much faster.
Some other answers mention variations required when placing the package to be installed into your requirements.txt. Note that with this archive syntax, the leading -e and trailing #egg=blah-blah are not required, and you can just simply paste the URL, so your requirements.txt looks like:
Use with AIhttps://github.com/user/repository/archive/branch.zip