Bug 825071

Summary: The version of numpy package on production servers is not working - getting "No module named distutils.core"
Product: OKD Reporter: Nam Duong <nduong>
Component: ContainersAssignee: Ram Ranganathan <ramr>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.xCC: jofernan, mfisher, mpatel, ramr, szhou
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-08 17:59:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nam Duong 2012-05-25 02:18:31 UTC
Description of problem:
As reported by a user: https://openshift.redhat.com/community/forums/openshift/using-ffnet-in-a-django-app-fails-on-install
when the user tries to add the ffnet package to a python app with this in setup.py:
install_requires=['Django>=1.4','psycopg2','django-piston','ffnet'],
ffnet install fails with:

>> File "/var/lib/stickshift/936ed8bdedf0469c8f789933e838740f/twt/virtenv/build/ffnet/setup.py", line 4, in
>> from numpy.distutils.core import Extension
>> ImportError: No module named distutils.core

Seems the version of numpy we have is borked:  http://mail.scipy.org/pipermail/scipy-user/2011-November/031097.html

Comment 1 Ram Ranganathan 2012-05-25 02:30:26 UTC
This can be fixed by installing 2 rpms.
    yum install numpy-f2py  gcc-gfortran

Comment 2 Ram Ranganathan 2012-05-25 03:59:34 UTC
Rob,  I have a fix for this in my devenv -- can check it in -- if its ok w/ ya.  Thanks.

Comment 3 Ram Ranganathan 2012-05-25 19:02:28 UTC
Fixed with git commit 30fe2e579aee8d1f3f42098735bb001176a94dee

The requisite packages are now installed as part of the python cartridge.

Comment 4 Shirley Zhou 2012-05-28 03:30:37 UTC
Reproduce this bug on prod env, get the same error as comment 0.

Verify this bug with devenv_1806, ffnet can be installed successfully when check this package from instance.
# ls /var/lib/stickshift/pythondev-szhou1/pythondev/virtenv/lib64/python2.6/site-packages
Django-1.4-py2.6.egg           easy-install.pth                    pip-1.0.2-py2.6.egg          setuptools.pth
django_piston-0.2.3-py2.6.egg  ffnet-0.7.1-py2.6-linux-x86_64.egg  setuptools-0.6c11-py2.6.egg  YourAppName.egg-link

And when check 2 rpms in comment 1, get 
numpy-f2py-1.3.0-6.2.el6.x86_64
gcc-gfortran-4.4.6-3.el6.x86_64

Change this bug as verified. Thanks.