Bug 1123988 - Unable to install scipy requirement in Python 2.7 cartridge
Summary: Unable to install scipy requirement in Python 2.7 cartridge
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Image
Version: 2.x
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Maciej Szulik
QA Contact: libra bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2014-07-28 19:13 UTC by Dawid Drechny
Modified: 2015-05-15 00:44 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-02-18 16:50:31 UTC

Attachments (Terms of Use)
GIt push output (22.36 KB, text/plain)
2014-07-28 19:13 UTC, Dawid Drechny
no flags Details
Setup.py (277 bytes, text/x-python-script)
2014-07-28 19:14 UTC, Dawid Drechny
no flags Details

Description Dawid Drechny 2014-07-28 19:13:23 UTC
Created attachment 921906 [details]
GIt push output

Description of problem:

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create a fresh application application using 'rhc app-create test python-2.7'
2. Edit setup.py and add 'scipy' to 'install_requires' list
3. Execute 'git push'

Actual results:
Package scipy is not installed:

remote:   File "/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/distutils/command/build_src.py", line 571, in f2py_sources
remote:     import numpy.f2py
remote: ImportError: No module named f2py

Expected results:
Package scipy is not installed

Additional info:
Full log and setup.py attached.

Comment 1 Dawid Drechny 2014-07-28 19:14:04 UTC
Created attachment 921907 [details]

Comment 2 Dawid Drechny 2014-07-30 19:08:02 UTC
The same problem exists for Python 3.3 cartridge.

Comment 3 Maciej Szulik 2014-08-26 10:01:16 UTC
Added scipy rpms to openshift deps.


Comment 4 openshift-github-bot 2014-08-28 20:36:39 UTC
Commits pushed to master at https://github.com/openshift/origin-server

Bug 1123988 - Added scipy for python-2.7 and python-3.3 cartridges

Merge pull request #5752 from soltysh/bug1123988

Merged by openshift-bot

Comment 5 Qixuan Wang 2014-08-29 05:53:56 UTC
Tested on devenv_5126, this issue still exists on python-2.7 and python-3.3. Plus, can't use this module on python-2.6 either.

1. Add scipy module 
[root@localhost py27]# cat setup.py 
from setuptools import setup

      description='OpenShift App',
      author='Your Name',
#      install_requires=['Django>=1.3'],

2. Git push the change. Here is part of git push log :
remote:     sources = self.f2py_sources(sources, ext)
remote:   File "/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/distutils/command/build_src.py", line 571, in f2py_sources
remote:     import numpy.f2py
remote: ImportError: No module named f2py

3. After git push, check module:
>>> import numpy
>>> import scipy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named scipy

[py27-bug.dev.rhcloud.com 540029c15b84331fab000023]\> pip list
Babel (0.9.6)
docutils (0.11)
Extractor (0.6)
Jinja2 (2.6)
MarkupSafe (0.11)
MySQL-python (1.2.3)
nose (1.3.0)
numpy (1.7.1)
pip (1.4)
psycopg2 (2.5.1)
Pygments (1.5)
setuptools (0.9.8)
simplejson (3.2.0)
Sphinx (1.1.3)
SQLAlchemy (0.7.9)
virtualenv (1.10.1)
Werkzeug (0.8.3)
wsgiref (0.1.2)
YourAppName (1.0)

Comment 6 Maciej Szulik 2014-09-11 13:19:17 UTC
I'm assuming it didn't landed in the devenv you tested. I've just tested it again on devenv_5159 -> works smoothly on both carts.

Comment 7 Qixuan Wang 2014-09-12 02:55:56 UTC
Tested on STG(devenv-stage_1006), scipy module has been loaded for python-2.7 and 3.3,  so move the bug to verified, thanks.

[py27-qwangstg.stg.rhcloud.com 54125e77dbd93c4d040011c3]\> pip list | grep scipy
scipy (0.12.1)
[py27-qwangstg.stg.rhcloud.com 54125e77dbd93c4d040011c3]\> python 
Python 2.7.5 (default, Dec  3 2013, 08:35:16) 
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy

[py33-qwangstg.stg.rhcloud.com 54125fad2587c8a4ac0010f3]\> pip list |grep scipy
scipy (0.12.1)
[py33-qwangstg.stg.rhcloud.com 54125fad2587c8a4ac0010f3]\> python
Python 3.3.2 (default, Mar 20 2014, 20:25:51) 
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy

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