Bug 1307233 - pip can't find package altough it's available on pypi
pip can't find package altough it's available on pypi
Product: OpenShift Online
Classification: Red Hat
Component: Image (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Vu Dinh
Wenjing Zheng
Depends On:
  Show dependency treegraph
Reported: 2016-02-13 07:36 EST by drust
Modified: 2017-05-31 14:22 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-05-31 14:22:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description drust 2016-02-13 07:36:27 EST
Description of problem:
on openshift online python-3.3 cartridge, pip can't find the latest version of python package altough it's available at pypi index.

Steps to Reproduce:
1. rhc app-create py33 python-3.3
2. cd py33
3. touch requirements.txt
4. echo requests==2.9.1 >> requirements.txt
5. git add .
6. git commit -a -m "requests2.9.1"
7. git push

Actual results:
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 274 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Stopping Python 3.3 cartridge
remote: Waiting for stop to finish
remote: Waiting for stop to finish
remote: Building git ref 'master', commit b6b983c
remote: Activating virtenv
remote: Checking for pip dependency listed in requirements.txt file..
remote: The directory '/var/lib/openshift/56b712f40c1e668ab20001a3/.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.
remote: The directory '/var/lib/openshift/56b712f40c1e668ab20001a3/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
remote: Collecting requests==2.9.1 (from -r /var/lib/openshift/56b712f40c1e668ab20001a3/app-root/runtime/repo/requirements.txt (line 1))
remote:   Could not find a version that satisfies the requirement requests==2.9.1 (from -r /var/lib/openshift/56b712f40c1e668ab20001a3/app-root/runtime/repo/requirements.txt (line 1)) (from versions: 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.4.0, 0.4.1, 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.6.6, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.7.4, 0.7.5, 0.7.6, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.8.5, 0.8.6, 0.8.7, 0.8.8, 0.8.9, 0.9.0, 0.9.1, 0.9.2, 0.9.3, 0.10.0, 0.10.1, 0.10.2, 0.10.3, 0.10.4, 0.10.6, 0.10.7, 0.10.8, 0.11.1, 0.11.2, 0.12.0, 0.12.1, 0.13.0, 0.13.1, 0.13.2, 0.13.3, 0.13.4, 0.13.5, 0.13.6, 0.13.7, 0.13.8, 0.13.9, 0.14.0, 0.14.1, 0.14.2, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.1.0, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 2.0.0, 2.0.1, 2.1.0, 2.2.0, 2.2.1, 2.3.0, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0, 2.6.1, 2.6.2, 2.7.0, 2.8.0, 2.8.1)
remote: No matching distribution found for requests==2.9.1 (from -r /var/lib/openshift/56b712f40c1e668ab20001a3/app-root/runtime/repo/requirements.txt (line 1))
remote: Running setup.py script..
remote: running develop
remote: running egg_info
remote: creating YourAppName.egg-info
remote: writing YourAppName.egg-info/PKG-INFO
remote: writing dependency_links to YourAppName.egg-info/dependency_links.txt
remote: writing top-level names to YourAppName.egg-info/top_level.txt
remote: writing manifest file 'YourAppName.egg-info/SOURCES.txt'
remote: reading manifest file 'YourAppName.egg-info/SOURCES.txt'
remote: writing manifest file 'YourAppName.egg-info/SOURCES.txt'
remote: running build_ext
remote: Creating /var/lib/openshift/56b712f40c1e668ab20001a3/app-root/runtime/dependencies/python/virtenv/venv/lib/python3.3/site-packages/YourAppName.egg-link (link to .)
remote: Adding YourAppName 1.0 to easy-install.pth file
remote: Installed /var/lib/openshift/56b712f40c1e668ab20001a3/app-root/runtime/repo
remote: Processing dependencies for YourAppName==1.0
remote: Finished processing dependencies for YourAppName==1.0
remote: Preparing build for deployment
remote: Deployment id is 19c7fb7b
remote: Activating deployment
remote: Starting Python 3.3 cartridge (Apache+mod_wsgi)
remote: Application directory "/" selected as DocumentRoot
remote: Application "wsgi.py" selected as default WSGI entry point
remote: -------------------------
remote: Git Post-Receive Result: success
remote: Activation status: success
remote: Deployment completed with status: success
To ssh://56b712f40c1e668ab20001a3@py33-chaticha.rhcloud.com/~/git/py33.git/
   be50ea8..b6b983c  master -> master

Expected results:
pip should find the latest version from pypi index and install it.

Additional info:
you can add latest version of almost any python package and reproduce this error.

Temporary fix:
I'm using two lines of commands in deploy action hook as a temporary fix for this problem.

echo "installing dependencies..."
pip install -r "$OPENSHIFT_REPO_DIR"requirements.txt
Comment 1 Vu Dinh 2016-02-22 13:50:23 EST
Hi drust,

I have an update for you regarding the issue with requests package. We do maintain a mirror for PyPi for our OpenShift system. So, sometimes, when a new package comes out in PyPi, our mirror will need to be resynced and during that time, the issue that you mentioned may occur.

Anyway, the mirror has been resynced and I have tested it on my end. The issue has been resolved and you should be able to install the newest version requests. Please give it a try and let us know the result.

Comment 2 Wenjing Zheng 2016-02-23 22:06:19 EST
Verified with devenv_5775:
remote: Collecting requests==2.9.1 (from -r /var/lib/openshift/56cd18a94c19363e9f000001/app-root/runtime/repo/requirements.txt (line 1))
remote:   Downloading http://mirror1.ops.rhcloud.com/mirror/python/web/packages/2.7/r/requests/requests-2.9.1-py2.py3-none-any.whl (501kB)
remote: Installing collected packages: requests
remote: Successfully installed requests-2.9.1
Comment 3 Eric Paris 2017-05-31 14:22:11 EDT
We apologize, however, we do not plan to address this report at this time. The majority of our active development is for the v3 version of OpenShift. If you would like for Red Hat to reconsider this decision, please reach out to your support representative. We are very sorry for any inconvenience this may cause.

Note You need to log in before you can comment on or make changes to this bug.