When I run pip search linkchecker I get
linkchecker - check websites and HTML documents for broken links
But when I try pip install linkchecker I get
Could not find any downloads that satisfy the requirement linkchecker
What am i doing wrong?
pip uses http://pypi.python.org/simple/<package name> to look for download links, and this package points to a kind of "non-obvious" target. pip looks for tarballs/zips in the source page, but can't find a suitable url.
Use -vvv to see how pip looks for this package:
pip install linkchecker -vvv
You may realize http://pypi.python.org/simple/linkchecker/ points to http://sourceforge.net/projects/linkchecker/files/, and there is no .tar.gz as href, only as content, and pip can't handle it.
In this case you could try this:
pip install http://sourceforge.net/projects/linkchecker/files/latest/download?source=files#egg=linkchecker -vvvv
update pip first.
pip install --upgrade pip
then, you can try install it again.
I had the same problem for installing the ultramysql package from Github.
However, trying the proposed solution of Hugo Tavares still gave the same error.
What helped in my case was adding git+ in front of the url, resulsting in the following line of code:
sudo pip install git+https://github.com/esnme/ultramysql
Related
I know that by default, pip uses PyPI to look for packages. I would like to know if there are other domains other than PypI that pip uses.
PIP Can install from
PyPI
VCS project URL
Local project directories
Local or remote source archives
to run from a local passage you can input pip install /opt/mypackage
Finally, run pip install --help to see all installation options
PIP can install from many different sources. You can find the whole list here
You can also setup your own Python package repository and configure pip to install from there.
pip install torch -f https://download.pytorch.org/whl/torch_stable.html
Hey. To fix my torch installation I have to run the above command. I was wondering if I am able to put urls in my requirements.txt?
simply putting the URL inside doesn't seem to work.
I tried the following: torch # https://download.pytorch.org/whl/torch_stable.html, but when I go to install i get
ERROR: Cannot determine archive format of C:\Users\benn\AppData\Local\Temp\pip-install-eu3abpd_\torch_ef332a557d1f4161bd846ea665b23740
So I have a python package in a url which is something like this
https://github.com/my_profile/repo/tree/not_master_branch/folder_1/package
I know to install a package via pip it's:
pip install git+https://github.com/user/repo.git#branch
but how do I specify the folders?
python -m pip install 'git+https://github.com/user/repo.git#branch#subdirectory=folder_1/package'
Reference:
https://pip.pypa.io/en/stable/reference/pip_install/?highlight=subdirectory#vcs-support
I'm wondering if it's possible to install a subset of the packages listed in a requirements file using the PIP CLI command or do I have to wrangle stuff in a makefile to get something like this?
pip install -r [package1, package2] requirements.txt
Regards
Not sure it would do exactly what you have in mind, but you could try something like:
python -m pip install Something Another --constraint requirements.txt
See pip' documentation section on constraints files.
I have Python3.8 built from source on my Debian 10 Xfce desktop (binaries are not available in Debian repositories). That said, whenever I can, I run my python scripts with pypy3, which I do for the sake of performance.
Now, when I run the following code with pypy3 :
#!/usr/bin/env python3.8
import requests
from bs4 import BeautifulSoup
url = input("What is the address of the web page in question?")
response = requests.get(url)
soup = BeautifulSoup(response.text, 'html.parser')
print(soup.title.string)
I get from pypy3:
ImportError: No module named 'requests'
The same script is run by Python3.8 without any problems
I assume that I would have to install the module in a similar way that I did it for Python, that is: sudo pip3.8 install requests.
Based on my research of a similar problem described on Stackoveflow I tried:
pypy3 -m pip3.8 install requests
and got the following from my pypy3:
Error while finding module specification for 'pip3.8' (ImportError: No >module named 'pip3')
Then I also tried to run:
pypy3 -m pip install requests
And got the following:
No module named pip
My pip3.8 works fine for Python3.8, not for my pypy3, though.
How should I look for modules in pypy3. And how should I install them?
Is the problem with installing and importing modules one of the reasons reason for the low usage of pypy3?
Run this once to install pip itself: pypy3 -m ensurepip
The next version of PyPy will improve the error message to describe this command explicitly when you do pypy3 -m pip and pip is not installed yet.
pypy3
Enable snaps on Debian and install pypy3
Snaps are applications packaged with all their dependencies to run on all popular Linux distributions from a single build. They update automatically and roll back gracefully.
Snaps are discoverable and installable from the Snap Store, an app store with an audience of millions.
Enable snapd:
sudo apt update
sudo apt install snapd
Install pypy3:
sudo snap install pypy3 --classic
Normally, the pip and package are installed as follows
First of all, you need to install the pip
Install pip for Python 3
Follow the steps below to install Pip for Python 3 on Debian:
First, update the package list with:
sudo apt update
Next, install pip for Python 3 and all of its dependencies by typing:
sudo apt install python3-pip
Verify the installation by printing the pip version:
pip3 --version
The version number may be different, but it will look something like the one below:
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.5)
Pip Usage
With pip, we can install packages from PyPI, version control, local projects, and from distribution files but in most cases, you will install packages from PyPI.
we want to install a package named croniter, we can do that by issuing the following command:
pip install requests
To uninstall a package run:
pip uninstall requests