Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing older version #130

Closed
sposs opened this issue Feb 23, 2015 · 9 comments
Closed

Installing older version #130

sposs opened this issue Feb 23, 2015 · 9 comments

Comments

@sposs
Copy link

sposs commented Feb 23, 2015

Hi,
When trying to install a package that has an older version then the oldest in the repository, it doesn't work:

pip install "celery==3.0.25"

Collecting celery==3.0.25
  Could not find a version that satisfies the requirement celery==3.0.25 (from versions: 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.8, 3.1.9, 3.1.10, 3.1.11, 3.1.12, 3.1.13, 3.1.14, 3.1.15, 3.1.16, 3.1.17)
  No distributions matching the version for celery==3.0.25
@canassa
Copy link
Collaborator

canassa commented Feb 23, 2015

Installing an older version should work, I just tested it on my machine. I guess you are having some other problem.

Could you provide more detailed steps on how to reproduce this error?

Thanks,

@sposs
Copy link
Author

sposs commented Feb 23, 2015

I was trying to install sentry, and it couldn't find celery&lt3.1.0,&gt3.0.5 so I tried to install celery==3.0.25 (the latest version that matches the query). In my localshop, I do not have such a low version, it starts at 3.1.4. The full log I have is (I'm using virtualenvwrapper to get a virtualenv):

sposs@work:/home/local/sposs/$ mktmpenv
New python executable in tmp-f79638cc7435d7b2/bin/python
Installing setuptools, pip...done.
This is a temporary environment. It will be deleted when you run 'deactivate'.
(tmp-f79638cc7435d7b2)sposs@work:/home/local/sposs/.virtualenvs/tmp-f79638cc7435d7b2$ pip install celery==3.0.25
Collecting celery==3.0.25
  This repository located at mylocalshop is not a trusted host, if this repository is available via HTTPS it is recommend to use HTTPS instead, otherwise you may silence this warning with '--trusted-host mylocalshop'.
  DEPRECATION: Implicitly allowing locations which are not hosted at a secure origin is deprecated and will require the use of --trusted-host in the future.
  Could not find a version that satisfies the requirement celery==3.0.25 (from versions: 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.8, 3.1.9, 3.1.10, 3.1.11, 3.1.12, 3.1.13, 3.1.14, 3.1.15, 3.1.16, 3.1.17)
  Some externally hosted files were ignored as access to them may be unreliable (use --allow-external to allow).
  No distributions matching the version for celery==3.0.25

mylocalshop is the host name I configured in my .pip/pip.conf.

@sposs
Copy link
Author

sposs commented Feb 23, 2015

And I should mention I updated localshop last week.

@canassa
Copy link
Collaborator

canassa commented Feb 23, 2015

I think I've managed to reproduce your problem.

The get_package_data function is called every time a package data needs to be fetched from PyPI. It's works but it's very slow. My guess is that the function took a very long time to return and this caused pip to retry the connection. Leaving a bogus packed behind.

Improving the get_package_data performance was already in my TO-DO list. Now that you have found this problem, I moved it to my top priority. I will work on this tonight.

@sposs
Copy link
Author

sposs commented Feb 23, 2015

Neat! Thanks!

@freakypie
Copy link

I have this problem in reverse, when i try to install a newer package (that isn't in my localshop) it fails to install or update the index.

Do you think that's the same problem? a timeout on the get_package_data function?

@trbs
Copy link

trbs commented Mar 9, 2015

Also having problems installing newer versions via localshop.

However it seems that this might not be localshops fault. The xmlrpclib package_releases() serves stale data for me.

$ pip install -U django==1.7.6
Collecting django==1.7.6
  No distributions matching the version for django==1.7.6

If I check manually on a different computer then I also do not see version 1.7.6 in the result of the package_releases call:

In [1]: import xmlrpclib

In [2]: p=xmlrpclib.ServerProxy("https://pypi.python.org/pypi")

In [3]: p.package_releases("Django")
Out[3]:
['1.8b1',
 '1.8a1',
 '1.7.5',
 '1.7.4',
 '1.7.3',
 '1.7.2',
 '1.7.1',
 '1.7',
 '1.6.10',
 '1.6.9',
 '1.6.8',
 '1.6.7',
 '1.6.6',
 '1.6.5',
 '1.6.4',
 '1.6.3',
 '1.6.2',
 '1.6.1',
 '1.6',
 '1.5.12',
 '1.5.11',
 '1.5.10',
 '1.5.9',
 '1.5.8',
 '1.5.7',
 '1.5.6',
 '1.5.5',
 '1.5.4',
 '1.5.3',
 '1.5.2',
 '1.5.1',
 '1.5',
 '1.4.19',
 '1.4.18',
 '1.4.17',
 '1.4.16',
 '1.4.15',
 '1.4.14',
 '1.4.13',
 '1.4.12',
 '1.4.11',
 '1.4.10',
 '1.4.9',
 '1.4.8',
 '1.4.7',
 '1.4.6',
 '1.4.5',
 '1.4.4',
 '1.4.3',
 '1.3.7',
 '1.3.6',
 '1.3.5',
 '1.2.7',
 '1.1.4',
 '1.0.4']

In [4]:

While the new json interface does not have this problem:

https://pypi.python.org/pypi/Django/json

{
    "info": {
        "maintainer": null, 
        "docs_url": "", 
        "requires_python": null, 
        "maintainer_email": null, 
        "cheesecake_code_kwalitee_id": null, 
        "keywords": null, 
        "package_url": "http://pypi.python.org/pypi/Django", 
        "author": "Django Software Foundation", 
        "author_email": "foundation@djangoproject.com", 
        "download_url": null, 
        "platform": "UNKNOWN", 
        "version": "1.8b2", 
        "cheesecake_documentation_id": null, 
        "_pypi_hidden": false, 
        "description": "UNKNOWN", 
        "release_url": "http://pypi.python.org/pypi/Django/1.8b2", 
        "downloads": {
            "last_month": 401471, 
            "last_week": 154250, 
            "last_day": 19679
        }, 
        "_pypi_ordering": 78, 
        "requires_dist": [
            "bcrypt; extra == 'bcrypt'"
        ], 
        "classifiers": [
            "Development Status :: 4 - Beta", 
            "Environment :: Web Environment", 
            "Framework :: Django", 
            "Intended Audience :: Developers", 
            "License :: OSI Approved :: BSD License", 
            "Operating System :: OS Independent", 
            "Programming Language :: Python", 
            "Programming Language :: Python :: 2", 
            "Programming Language :: Python :: 2.7", 
            "Programming Language :: Python :: 3", 
            "Programming Language :: Python :: 3.2", 
            "Programming Language :: Python :: 3.3", 
            "Programming Language :: Python :: 3.4", 
            "Topic :: Internet :: WWW/HTTP", 
            "Topic :: Internet :: WWW/HTTP :: Dynamic Content", 
            "Topic :: Internet :: WWW/HTTP :: WSGI", 
            "Topic :: Software Development :: Libraries :: Application Frameworks", 
            "Topic :: Software Development :: Libraries :: Python Modules"
        ], 
        "bugtrack_url": "", 
        "name": "Django", 
        "license": "BSD", 
        "summary": "A high-level Python Web framework that encourages rapid development and clean, pragmatic design.", 
        "home_page": "http://www.djangoproject.com/", 
        "stable_version": null, 
        "cheesecake_installability_id": null
    }, 
    "releases": {
... snip ...
        "1.7.6": [
            {
                "has_sig": true, 
                "upload_time": "2015-03-09T15:30:40", 
                "comment_text": "", 
                "python_version": "py2.py3", 
                "url": "https://pypi.python.org/packages/py2.py3/D/Django/Django-1.7.6-py2.py3-none-any.whl", 
                "md5_digest": "9ede80f1a893835ffecce15b23534d82", 
                "downloads": 0, 
                "filename": "Django-1.7.6-py2.py3-none-any.whl", 
                "packagetype": "bdist_wheel", 
                "size": 7422729
            }, 
            {
                "has_sig": true, 
                "upload_time": "2015-03-09T15:30:50", 
                "comment_text": "", 
                "python_version": "source", 
                "url": "https://pypi.python.org/packages/source/D/Django/Django-1.7.6.tar.gz", 
                "md5_digest": "e73ec0ba059a5f24563d785763cae37d", 
                "downloads": 0, 
                "filename": "Django-1.7.6.tar.gz", 
                "packagetype": "sdist", 
                "size": 7601179
            }
        ], 
... snip ...
    }, 
    "urls": [
        {
            "has_sig": true, 
            "upload_time": "2015-03-09T15:55:16", 
            "comment_text": "", 
            "python_version": "py2.py3", 
            "url": "https://pypi.python.org/packages/py2.py3/D/Django/Django-1.8b2-py2.py3-none-any.whl", 
            "md5_digest": "f585d674396cde011b9cf5878ba0852f", 
            "downloads": 0, 
            "filename": "Django-1.8b2-py2.py3-none-any.whl", 
            "packagetype": "bdist_wheel", 
            "size": 6522351
        }
    ]
}

@canassa
Copy link
Collaborator

canassa commented Apr 8, 2015

Sorry for the delay 😞

I latest version on the develop branch is not using the XMLRPC API anymore. I think this should many problems that you might be having.

Could you please retest it? If everything is okay I will release a new version on PyPI.

Thanks,

@canassa
Copy link
Collaborator

canassa commented Apr 14, 2015

I am closing this for now. Feel free to reopen if you are still having problems.

@canassa canassa closed this as completed Apr 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants