pypi

JSON API for PyPi - how to list packages?

蓝咒 提交于 2019-11-29 03:38:21
There is a JSON API for PyPI which allows getting data for packages: http://pypi.python.org/pypi/<package_name>/json http://pypi.python.org/pypi/<package_name>/<version>/json However, is it possible to get a list of all PyPI packages (or, for example, recent ones) with a GET call? The easiest way to do this is to use the simple index at PyPI which lists all packages without overhead. You can then request the JSON of each package individually by performing a GET request to the URLs mentioned in your question. I know that you asked for a way to do this from the JSON API, but you can use the XML

Difference between pip install options “ignore-installed” and “force-reinstall”

可紊 提交于 2019-11-29 01:19:46
There are two pip install options related to reinstalling the packages, which are --ignore-installed and --force-reinstall . These two options described as following in the official doc --force-reinstall Reinstall all packages even if they are already up-to-date. -I, --ignore-installed Ignore the installed packages (reinstalling instead). It seems that they all ignore something and do the reinstallation but I cannot tell the difference between them (I can see some difference if I actually execute them ... but I cannot explain). If I search "force reinstall packages in pip", the result lists

PIP Could not find any downloads that satisfy the requirement SQLAlchemy

风格不统一 提交于 2019-11-28 23:01:33
Ubuntu 12.04 Apache 2.2.22 pip has stopped working on my ubuntu server and gives the below error when I try to download anything. $ sudo pip install SQLAlchemy Downloading/unpacking SQLAlchemy Cannot fetch index base URL http://pypi.python.org/simple/ Could not find any downloads that satisfy the requirement SQLAlchemy No distributions at all found for SQLAlchemy Storing complete log in /home/user/.pip/pip.log All of the below also do not work $ sudo pip install --upgrade pip $ sudo apt-get install build-essential My /etc/environment has the below settings which were working previously. http

Why does pip fail with bad md5 hash for package?

邮差的信 提交于 2019-11-28 22:36:02
问题 I'm trying to install Django package in a virtualenv. I'm on a new computer (OSX 10.8.2). I installed virtualenv via easy_install. With the virtualenv activated, I ran: (pyenv)$ pip install Django Downloading/unpacking Django Downloading Django-1.5.1.tar.gz (8.0MB): 2.0MB downloaded Hash of the package https://pypi.python.org/packages/source/D/Django/Django-1.5.1.tar.gz#md5=7465f6383264ba167a9a031d6b058bff (from https://pypi.python.org/simple/Django/) (<md5 HASH object @ 0x108453df0>) doesn't

pip requirements.txt with alternative index

≯℡__Kan透↙ 提交于 2019-11-28 22:18:15
问题 I want to put all the requirements of a repoze Zope2 install in a pip requirements file. Most of the repoze packages don't seem to be on PyPi, but there's an alternative PyPi index for them here. But I can't figure out how to tell pip to use that index together with a requirements file. For single packages, it's easy pip install zopelib -i http://dist.repoze.org/zope2/2.10/simple/ I tried the following pip install -r requirements.txt -i http://dist.repoze.org/zope2/2.10/simple/ or in my

Packaging resources with setuptools/distribute

倾然丶 夕夏残阳落幕 提交于 2019-11-28 20:50:00
I'm developing an Python egg that has several .txt dependencies (they're templates used to generate files by the egg itself), and I'm struggling to get those dependencies copied to site-packages during setup.py install . According to the distribute documentation ... Filesystem of my package: setup.py package |--- __init__.py |--- main.py |--- binary (calls main.py with pkg_resources.load_entry_point) |--- templates |--file1.txt |--file2.txt In setup.py: setup( [...] eager_resources = ['templates/file1.txt', 'templates/file2.txt'] ) Within my package: from pkg_resources import resource_string

Why does pip install matplotlib version 0.91.1 when PyPi shows version 1.0.0?

不问归期 提交于 2019-11-28 18:41:16
Update Oct 15, 2012 PyPi is now showing matplotlib at 1.1.0 so this issue is resolved. Install matplotlib via: pip install matplotlib Outdated Information Below PyPi shows matplotlib 1.0.0 . However, when I install matplotlib via pip into a virtualenv , version 0.91.1 is installed. Why the difference in versions? Is there a way to pip install matplotlib 1.0.0? Research It appears that matplotlib's DOAP record on PyPi is pointing to the correct version. Below is the DOAP record for reference: <?xml version="1.0" encoding="UTF-8" ?> <rdf:RDF xmlns="http://usefulinc.com/ns/doap#" xmlns:foaf="http

Optional dependencies in a pip requirements file

╄→尐↘猪︶ㄣ 提交于 2019-11-28 18:39:26
How can I specify optional dependencies in a pip requirements file? According to the pip documentation this is possible, but the documentation doesn't explain how to do it and I can't find any examples on the web. Instead of specifying optional dependencies in the same file as the hard requirements, you can create a optional-requirements.txt and a requirements.txt . To export your current environment's packages into a text file, you can do this: pip freeze > requirements.txt If necessary, modify the contents of the requirements.txt to accurately represent your project's dependencies. Then, to

pypi使用腾讯源

不想你离开。 提交于 2019-11-28 17:35:44
通过修改~/.pip/pip.conf [global] index-url = https://mirrors.cloud.tencent.com/pypi/simple trusted-host = mirrors.cloud.tencent.com 通过命令(pip>=10.0.0) pip config set global.index-url https://mirrors.cloud.tencent.com/pypi/simple 来源: https://www.cnblogs.com/locbytes/p/11416535.html

pypi see older versions of package [duplicate]

半世苍凉 提交于 2019-11-28 17:18:24
问题 This question already has an answer here: Python and pip, list all versions of a package that's available? 14 answers This is the package I'm interested in : https://pypi.python.org/pypi/django-filebrowser-no-grappelli/ However the latest version no longer supports Django 1.3. I need to find a version that does. How do I see list of older versions ? 回答1: It's perhaps a little inelegant, but it appears that you can go to the URL https://pypi.python.org/simple/<package> And you will get a bunch