pip install editable cant' find master branch - pip

I need to install master branch of django-activity-stream. Therefore I put
the following line to my requirements.txt
-e git+git#github.com:justquick/django-activity-stream.git#master#egg=django-activity-stream
I used to work before, but it broke
Python 3.9.1
pip 21.2.4
Attempts:
pip install -e git+git#github.com:justquick/django-activity-stream.git#master#egg=django-activity-stream
ERROR: git+git#github.com:justquick/django-activity-stream.git#master#egg=django-activity-stream is not a valid editable
requirement. It should either be a path to a local project or a VCS URL
(beginning with bzr+http, bzr+https, bzr+ssh, bzr+sftp, bzr+ftp, bzr+lp,
bzr+file, git+http, git+https, git+ssh, git+git, git+file, hg+file, hg+http,
hg+https, hg+ssh, hg+static-http, svn+ssh, svn+http, svn+https, svn+svn, svn+file).
pip install -e git+ssh://github.com:justquick/django-activity-stream.git#master#egg=django-activity-stream
Obtaining django-activity-stream from git+ssh://github.com:justquick/django-activity-stream.git#master#egg=django-activity-stream
Cloning ssh://github.com:justquick/django-activity-stream.git (to revision master) to /Users/sarit/.pyenv/versions/3.9.1/envs/multy_herr/src/django-activity-stream
Running command git clone -q ssh://github.com:justquick/django-activity-stream.git /Users/sarit/.pyenv/versions/3.9.1/envs/multy_herr/src/django-activity-stream
ssh: Could not resolve hostname github.com:justquick: nodename nor servname provided, or not known
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
WARNING: Discarding git+ssh://github.com:justquick/django-activity-stream.git#master#egg=django-activity-stream. Command errored out with exit status 128: git clone -q ssh://github.com:justquick/django-activity-stream.git /Users/sarit/.pyenv/versions/3.9.1/envs/multy_herr/src/django-activity-stream Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement django-activity-stream (unavailable) (from versions: 0.2, 0.2.1, 0.3, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9, 0.4.0b1, 0.4.0b2, 0.4.0b3, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.4.5b1, 0.4.5, 0.5.0b1, 0.5.0, 0.5.1, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.7.0, 0.8.0, 0.9.0, 0.10.0)
ERROR: No matching distribution found for django-activity-stream (unavailable)
References:
pip install via requirements.txt specify a direct GitHub private repo + branch name erroring with exit status 128
https://het.as.utexas.edu/HET/Software/Pip/reference/pip_install.html
Question:
What is the correct editable of installing master branch of django-activity-stream?

These URLs work for me:
pip install -e 'git+ssh://git#github.com/justquick/django-activity-stream.git#master#egg=django-activity-stream'
and
pip install -e 'git+https://github.com/justquick/django-activity-stream.git#master#egg=django-activity-stream'
It seems pip doesn't understand scp-like Git URLs.

Related

Trouble using PIP Install

Having trouble installing any packages or upgrading through PIP install. basically i want to install packages for Data Science. Not able to use CONDA either.
Error I got-
ERROR: Could not find a version that satisfies the requirement menuinst (from conda) (from versions: none)
ERROR: No matching distribution found for menuinst (from conda)
WARNING: You are using pip version 19.2.3, however version 20.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

Getting pip pystruct==0.3.2 to build under python=3.7

There is no current solution for building pystruct 0.3.2 under python=3.7 because of an issue with support for python<=3.6 and resulting in a build time error related to curexc_traceback not being found. Also the utils.pyx file is not circulated with the pip tarball, resulting in an inability to rebuild the cython package that appears in the github version, as opposed to the pypi version. How can we patch and build pystruct==0.3.2 from pip?
It turns out that if you combine the github version and pypi version, you can find a way that allows you to build the pip version as follows:
#!/usr/bin/env bash
VERSION=0.3.2
pip download pystruct==${VERSION}
git clone https://github.com/pystruct/pystruct
tar xzf pystruct-${VERSION}.tar.gz
mv pystruct-${VERSION}/src/utils.c pystruct-${VERSION}/src/utils.save
cp pystruct/src/utils.pyx pystruct-${VERSION}/src/
cython pystruct-${VERSION}/src/utils.pyx
cd pystruct-${VERSION} && python ./setup.py install

pipenv install packages failes

I'm trying to install packages from a Pipfile with pipenv but I keep getting an error I don't know how debug.
pip --version
pip 18.1
pipenv --version
version 2018.10.9
The error I'm getting is:
pipenv install --dev --deploy
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Installing dependencies from Pipfile.lock (917af8)…
An error occurred while installing backports-ssl-match-hostname==3.5.0.1 --hash=sha256:502ad98707319f4a51fa2ca1c677bd659008d27ded9f6380c79e8932e38dcdf2! Will try again.
🐍 β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰ 185/185 β€” 00:00:33
Installing initially failed dependencies…
Collecting backports-ssl-match-hostname==3.5.0.1 :00
Could not find a version that satisfies the requirement backports-ssl-match-hostname==3.5.0.1 (from -r /tmp/pipenv-qlbc3amj-requirements/pipenv-akfm2pt_-requirement.txt (line 1)) (from versions: )
No matching distribution found for backports-ssl-match-hostname==3.5.0.1 (from -r /tmp/pipenv-qlbc3amj-requirements/pipenv-akfm2pt_-requirement.txt (line 1))
☀ β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰ 0/1 β€” 00
Looking at the Pipfile.lock I can find the backports package defined as:
"backports.ssl-match-hostname": {
"hashes": [
"sha256:502ad98707319f4a51fa2ca1c677bd659008d27ded9f6380c79e8932e38dcdf2"
],
"version": "==3.5.0.1"
},
Running everything with the verbose flag, the backports package is a dependency from recurly which is in the Pipfile:
recurly = ">=2.8.6"
Downgrade your pip version to 18.0.0 while your pipenv shell is active
python -m pip install pip==18.0.0
It worked for me

Errors while trying to use pip on OpenShift

I am getting the following error both when using git and when logging in via rhc and try to install the requirements file:
The directory '/var/lib/openshift/***/.cache/pip/http' or its parent
directory is not owned by the current user and the cache has been disabled.
Please check the permissions and owner of that directory.
If executing pip with sudo, you may want sudo's -H flag.
You are using pip version 7.1.0, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
I am not trying to install with sudo.
What I am trying to do is:
Log into via rhc and and ssh: rhc ssh 'app'
activate venv: source $OPENSHIFT_PYTHON_DIR/virtenv/bin/activate
pip install -r "$OPENSHIFT_REPO_DIR" requirements.txt
Note that $OPENSHIFT_PYTHON_DIR and $OPENSHIFT_REPO_DIR are the environment variables given by OpenShift to access the relevant folders.
Any ideas? I am on a Python 2.7 cartridge.
Openshift will automatically install your dependencies based on a requirements.txt file. So you shouldn't ssh into your app and do that yourself.
You can find more information about it on the developer center pages. [1]

git-core has been made obsolete by the port git

I want to run "repo" command on Mac (And download the code from Git repo). I was following the above guide:
http://threadeds.blogspot.com/2009/02/getting-started-with-google-android-on.html
When I execute the command,
POSIXLY_CORRECT=1 sudo port install gmake libsdl git-core gnupg
I get this error:
I'm having the following issue while installing
Error: git-core has been made obsolete by the port git. Please install git instead.
Error: org.macports.configure for port git-core returned: obsolete port
Please see the log file for port git-core for details:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_git-core/git-core/main.log
To report a bug, follow the instructions in the guide:
http://guide.macports.org/#project.tickets
Error: Processing of port git-core failed
How can I resolve this issue?
It seems that port has renamed the git-core package to just git. So changing the command to
POSIXLY_CORRECT=1 sudo port install gmake libsdl git gnupg
should work.
If you update macports (sudo port selfupdate) you'll find that repo now depends on git instead of git-core.
Before: (/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/python/repo/Portfile) contains:
depends_run port:git-core
After:
port info repo
repo #1.19_1 (python)
Description: Repo is a tool that we built on top of Git. Repo helps us
manage the many Git repositories, does the uploads to our
revision control system , and automates parts of the
Android development workflow. Repo is not meant to replace
Git, only to make it easier to work with Git in the
context of Android.
Homepage: http://source.android.com/source/git-repo.html
Runtime Dependencies: git
Platforms: darwin
License: Apache-2
Maintainers: nomaintainer#macports.org
or
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/python/repo/Portfile:
depends_run port:git
So simply use macports to install repo.

Resources