Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip install package from url

pip install http://www.crummy.com/software/BeautifulSoup/unreleased/4.x/BeautifulSoup-4.0b.tar.gz 

this installs package bs4, and everything is ok. But if I add this line to requirements.txt

http://www.crummy.com/software/BeautifulSoup/unreleased/4.x/BeautifulSoup-4.0b.tar.gz 

and run

pip install -r requirements.txt 

the output is

  Downloading/unpacking http://www.crummy.com/software/BeautifulSoup/unreleased/4.x/BeautifulSoup-4.0b.tar.gz (from -r requirements.txt (line 40))   Downloading BeautifulSoup-4.0b.tar.gz (42Kb): 42Kb downloaded   Running setup.py egg_info for package from http://www.crummy.com/software/BeautifulSoup/unreleased/4.x/BeautifulSoup-4.0b.tar.gz 

but the package doesn't get installed.

>>> import bs4 Traceback (most recent call last):   File "<stdin>", line 1, in <module> ImportError: No module named bs4 
like image 683
Ivan Virabyan Avatar asked Oct 14 '11 13:10

Ivan Virabyan


People also ask

How do I add an index URL to requirements txt?

To add the azure artifacts index to the install command, we've added --extra-index-url https://pkgs.dev.azure.com/<org>/_packaging/mypackage/pypi/simple/ at the top of the requirements. txt file and added the mypackage package to the requirements. txt list.

Can you pip install a local package?

Install the downloaded package into a local directory : python get-pip.py --user This will install pip to your local directory (. local/bin) . Now you may navigate to this directory (cd . local/bin) and then use pip or better set your $PATH variable this directory to use pip anywhere : PATH=$PATH:~/.


1 Answers

Note that this can happen if you have more than one interpreter installed and pip is using one (e.g., 2.6) and your python shell another (e.g., 2.7)

like image 176
dgorissen Avatar answered Sep 28 '22 06:09

dgorissen