[Numpy-discussion] Numpy compilation error
Dear all, Upon trying to install numpy using 'pip install numpy' in a virtualenv, I get the following error messages: creating build/temp.linux-x86_64-2.7/numpy/random/mtrand compile options: '-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.linux-x86_64-2.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include -I/usr/include/python2.7 -Ibuild/src.linux-x86_64-2.7/numpy/core/src/private -Ibuild/src.linux-x86_64-2.7/numpy/core/src/private -Ibuild/src.linux-x86_64-2.7/numpy/core/src/private -Ibuild/src.linux-x86_64-2.7/numpy/core/src/private -c' gcc: numpy/random/mtrand/distributions.c numpy/random/mtrand/distributions.c: In function ‘loggam’: numpy/random/mtrand/distributions.c:892:1: internal compiler error: Illegal instruction } ^ Please submit a full bug report, with preprocessed source if appropriate. See http://bugzilla.redhat.com/bugzilla for instructions. Preprocessed source stored into /tmp/ccjkBSd2.out file, please attach this to your bugreport. This leads to the compilation process failing with this error: Cleaning up... Command /home/mescalin/pkerp/.virtualenvs/notebooks/bin/python -c import setuptools;__file__='/home/mescalin/pkerp/.virtualenvs/notebooks/build/numpy/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file __, 'exec')) install --record /tmp/pip-c_Cd7B-record/install-record.txt --single-version-externally-managed --install-headers /home/mescalin/pkerp/.virtualenvs/notebooks/include/site/python2.7 failed with error code 1 in /ho me/mescalin/pkerp/.virtualenvs/notebooks/build/numpy Traceback (most recent call last): File /home/mescalin/pkerp/.virtualenvs/notebooks/bin/pip, line 9, in module load_entry_point('pip==1.4.1', 'console_scripts', 'pip')() File /home/mescalin/pkerp/.virtualenvs/notebooks/lib/python2.7/site-packages/pip/__init__.py, line 148, in main return command.main(args[1:], options) File /home/mescalin/pkerp/.virtualenvs/notebooks/lib/python2.7/site-packages/pip/basecommand.py, line 169, in main text = '\n'.join(complete_log) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 72: ordinal not in range(128) Have any of you encountered a similar problem before? Thanks in advance, -Peter The gcc version is: [pkerp@fluidspace ~]$ gcc --version gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-7) Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. PS: ccjkBSd2.out Description: chemical/gulp ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Numpy compilation error
12.04.2015, 17:15, Peter Kerpedjiev kirjoitti: [clip] numpy/random/mtrand/distributions.c:892:1: internal compiler error: Illegal instruction An internal compiler error means your compiler (in this case, gcc) is broken. The easiest solution is to use a newer version of the compiler, assuming the compiler bug in question has been fixed. Here, it probably has, since I have not seen similar error reports before from this code. ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Numpy compilation error
On Fri, Apr 30, 2010 at 5:23 AM, Pradeep Jha jh...@utias.utoronto.ca wrote: Hi, I have a few questions: 1) I downloaded numpy1.3.0 and installed it in a directory using the command python setup.py install --prefix=$HOME/src/numpy and I see that numpy files have been generated in that directory. Now when I tried to install matplotlib, it complained that my numpy version is 1.0.3 That's because by default, python does not look into $HOME/src/numpy/ You have several ways of controlling that, but the easy one is PYTHONPATH. This environment variable should contain your site-package, which is the $prefix/lib/python2.4/site-packages here where $prefix is what you gave to --prefix. PYTHONPATH is only on of the way to modify sys.path, which is what is used by python in the end: # python will only look for packages which are sys.path python -c import sys; print sys.path You can check the path of the package after import: python -c import numpy; print numpy.__file__ David ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Numpy compilation error
Thanks. That works. 2010/4/29 David Cournapeau courn...@gmail.com On Fri, Apr 30, 2010 at 5:23 AM, Pradeep Jha jh...@utias.utoronto.ca wrote: Hi, I have a few questions: 1) I downloaded numpy1.3.0 and installed it in a directory using the command python setup.py install --prefix=$HOME/src/numpy and I see that numpy files have been generated in that directory. Now when I tried to install matplotlib, it complained that my numpy version is 1.0.3 That's because by default, python does not look into $HOME/src/numpy/ You have several ways of controlling that, but the easy one is PYTHONPATH. This environment variable should contain your site-package, which is the $prefix/lib/python2.4/site-packages here where $prefix is what you gave to --prefix. PYTHONPATH is only on of the way to modify sys.path, which is what is used by python in the end: # python will only look for packages which are sys.path python -c import sys; print sys.path You can check the path of the package after import: python -c import numpy; print numpy.__file__ David ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Numpy compilation error
Hi, I have a few questions: 1) I downloaded numpy1.3.0 and installed it in a directory using the command *python setup.py install --prefix=$HOME/src/numpy *and I see that numpy files have been generated in that directory. Now when I tried to install matplotlib, it complained that my numpy version is 1.0.3. When I go in python mode on command line I get the following output: *[prad...@scaramanga ~]$python Python 2.4.4 (#1, Oct 23 2006, 13:58:00) [GCC 4.1.1 20061011 (Red Hat 4.1.1-30)] on linux2 Type help, copyright, credits or license for more information. import numpy print numpy.__version__ 1.0.3 * 2) I donwloaded Scipy.0.7.2 from http://sourceforge.net/projects/scipy/files/ I installed it using *python setup.py install --prefix=$HOME/src/scipy * Again when I goto command line python, I get the following output *[prad...@scaramanga ~]$python Python 2.4.4 (#1, Oct 23 2006, 13:58:00) [GCC 4.1.1 20061011 (Red Hat 4.1.1-30)] on linux2 Type help, copyright, credits or license for more information. import scipy /usr/lib/python2.4/site-packages/scipy/misc/__init__.py:25: DeprecationWarning: ScipyTest is now called NumpyTest; please update your code test = ScipyTest().test * Why isn't my python reading things from the newer installed versions? Thanks PRadeep 2010/4/21 David Cournapeau courn...@gmail.com On Thu, Apr 22, 2010 at 2:23 AM, Christopher Barker chris.bar...@noaa.gov wrote: I hadn't read the thread carefully enough to realize that the OP was asking about a non-root install, but in any case, I'd still encourage that folks set ONE standard place in their PYTHONPATH, rather than one for each package, and make sure you're careful about running more than one version of Python. The beauty of --user is that you don't need PYTHONPATH, and it is interpreter specific (at least if the package is correctly done). PYTHONPATH is becoming a pain with python 3.* cheers, David ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Numpy compilation error
On Thu, Apr 22, 2010 at 2:23 AM, Christopher Barker chris.bar...@noaa.gov wrote: I hadn't read the thread carefully enough to realize that the OP was asking about a non-root install, but in any case, I'd still encourage that folks set ONE standard place in their PYTHONPATH, rather than one for each package, and make sure you're careful about running more than one version of Python. The beauty of --user is that you don't need PYTHONPATH, and it is interpreter specific (at least if the package is correctly done). PYTHONPATH is becoming a pain with python 3.* cheers, David ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Numpy compilation error
On Tue, Apr 20, 2010 at 10:34 AM, Christopher Barker chris.bar...@noaa.gov wrote: Pradeep Jha wrote: Thank you so much Robert. You are awesome :) That totally the problem. One more question for you. Which are the things that you have to declare in PYTHONPATH manually? I never put anything in PYTHONPATH -- if you install everything you need, you won't need to. When I'm using something under development, I use setuptools' setup.py develop I don't think it is wise to advocate the use of develop for python newcomers. It comes with issues which are difficult to track down (stalled files for entry points which are not removed by uninstall -u, etc...). Those are non issues for the experienced users, but a pain in my experience for beginners. The easy and reliable solution for non root install is PYTHONPATH for python 2.6 and install --user for python = 2.6. cheers, David ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Numpy compilation error
David Cournapeau wrote: I don't think it is wise to advocate the use of develop for python newcomers. Fair enough. What I know is that every scheme I've come up with for working with my own under-development packages has been a pain in the #$@, and -develop has worked well for me. The easy and reliable solution for non root install is PYTHONPATH for python 2.6 and install --user for python = 2.6. I hadn't read the thread carefully enough to realize that the OP was asking about a non-root install, but in any case, I'd still encourage that folks set ONE standard place in their PYTHONPATH, rather than one for each package, and make sure you're careful about running more than one version of Python. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Numpy compilation error
On Mon, Apr 19, 2010 at 09:58, Pradeep Jha jh...@utias.utoronto.ca wrote: Thank you so much Robert. You are awesome :) That totally the problem. One more question for you. Which are the things that you have to declare in PYTHONPATH manually? In your case, just the site-packages/ directory you installed to. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Numpy compilation error
Pradeep Jha wrote: Thank you so much Robert. You are awesome :) That totally the problem. One more question for you. Which are the things that you have to declare in PYTHONPATH manually? I never put anything in PYTHONPATH -- if you install everything you need, you won't need to. When I'm using something under development, I use setuptools' setup.py develop -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Numpy compilation error
On Mon, Apr 19, 2010 at 20:34, Christopher Barker chris.bar...@noaa.gov wrote: Pradeep Jha wrote: Thank you so much Robert. You are awesome :) That totally the problem. One more question for you. Which are the things that you have to declare in PYTHONPATH manually? I never put anything in PYTHONPATH -- if you install everything you need, you won't need to. When I'm using something under development, I use setuptools' setup.py develop He does not have root. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Numpy compilation error
Thank you so much Robert. You are awesome :) That totally the problem. One more question for you. Which are the things that you have to declare in PYTHONPATH manually? 2010/4/18 Robert Kern robert.k...@gmail.com On Sun, Apr 18, 2010 at 19:49, Pradeep Jha jh...@utias.utoronto.ca wrote: Hi, I am setting NUMPY_INC_DIR to what you said but still am getting the same error. Basically, there is no directory path like ***/include/python/*** anywhere in the installed numpy directory. This is correct. No such directory should exist. whatever I am setting in my NUMPY_INC_DIR, the preconfig file tries to add a /include/python to that string and tries to locate that path, but fails. I am not familiar with the Cantera build process. You will probably need to ask the Cantera developers. You could probably replace the line in setup.py.in (sorry if this is not exactly right; I only downloaded the 1.7.0 sources, which still uses numarray): numpy_incl = @NUMPY_INC_DIR@ to: import numpy numpy_incl = numpy.get_include() Then the value of NUMPY_INC_DIR will not matter. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Numpy compilation error
Hi, how do I figure where did my numpy got installed to? I downloaded a tar.gz file and then unzipped it at /nfs/carv/d1/people/pradeep/src/numpy-1.3.0/. I didn't do any additional installation steps. Also, just fyi, I don't have root access to this system. Thanks 2010/4/16 Robert Kern robert.k...@gmail.com On Fri, Apr 16, 2010 at 20:56, josef.p...@gmail.com wrote: On Fri, Apr 16, 2010 at 9:47 PM, Pradeep Jha jh...@utias.utoronto.ca wrote: Hi, before running the make command, it asks me to run the preconfig file. When I run preconfig, I get the following warning message during the run: checking for python2... /usr/bin/python2 Python command set by configure to /usr/bin/python2 WARNING: NUMPY include dir /nfs/carv/d1/people/pradeep/src/numpy-1.3.0//include/python does not exist. setting NUMPY_INC_DIR to /nfs/carv/d1/people/pradeep/src/numpy-1.3.0//include/python Is duplicate forward-slash legal in a Linux path? Yes. It is ignored. You need to set NUMPY_INC_DIR to $PYTHON_SITE_PACKAGES/numpy/core/include where $PYTHON_SITE_PACKAGES is the site-packages/ directory where your installation of numpy got installed to. Note that this is not /nfs/carv/d1/people/pradeep/src/numpy-1.3.0/. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Numpy compilation error
Hi, I am running python 2.4.4. I installed numpy using the command* * *python setup.py install --prefix=$HOME/**bin* my site-packages directory got installed to the following address:* /nfs/carv/d1/people/pradeep/bin/lib/python2.4* in my preconfig file I changed the path to the following as you recommended * # If numpy was installed using the --home option, set this to the # home directory for numpy. This will be needed for all numpy installations # that don't put the include files into python's native include directory. NUMPY_HOME=${NUMPY_HOME:=/nfs/carv/d1/people/pradeep/bin/lib/python2.4/site-packages/numpy/core/include} * I still get the following warning message when I run the preconfig file:* checking for python2... /usr/bin/python2 Python command set by configure to /usr/bin/python2 WARNING: NUMPY include dir /nfs/carv/d1/people/pradeep/bin/lib/python2.4/site-packages/numpy/core/include/include/python does not exist. setting NUMPY_INC_DIR to /nfs/carv/d1/people/pradeep/bin/lib/python2.4/site-packages/numpy/core/include/include/python * Whats going wrong? The warning is right, as there is no directory called *python *on that address. Just to give you the structure of the installed packages, I am attaching the output to the cd and ls commands: *[prad...@scaramanga lib]$ls python2.4 [prad...@scaramanga lib]$cd python2.4/ [prad...@scaramanga python2.4]$ls site-packages [prad...@scaramanga python2.4]$cd site-packages/ [prad...@scaramanga site-packages]$ls numpy [prad...@scaramanga site-packages]$cd numpy/ [prad...@scaramanga numpy]$ls add_newdocs.py __config__.pyc DEV_README.txt dual.pyc _import_tools.pyc lib matlib.py random setupscons.py tests add_newdocs.pyc coredistutils f2py __init__.pyLICENSE.txt matlib.pyc README.txt setupscons.pyc THANKS.txt COMPATIBILITYctypeslib.pydoc fft __init__.pyc linalg numarraysetup.pysite.cfg.example version.py __config__.pyctypeslib.pyc dual.py _import_tools.py INSTALL.txtma oldnumeric setup.pyc testing version.pyc [prad...@scaramanga numpy]$cd core/ [prad...@scaramanga core]$ls arrayprint.py defmatrix.pyc include _internal.py numeric.pyrecords.pycsetup_common.pyc _sort.so arrayprint.pycfromnumeric.py info.py _internal.pyc numeric.pyc scalarmath.so setup.py tests defchararray.py fromnumeric.pyc info.pyc memmap.py numerictypes.py scons_support.py setup.pyc umath.so defchararray.pyc generate_numpy_api.py __init__.py memmap.pyc numerictypes.pyc scons_support.pyc setupscons.py umath_tests.so defmatrix.py generate_numpy_api.pyc __init__.pyc multiarray.so records.py setup_common.pysetupscons.pyc [prad...@scaramanga core]$cd include/ [prad...@scaramanga include]$ls numpy [prad...@scaramanga include]$cd numpy/ [prad...@scaramanga numpy]$ls arrayobject.h mingw_amd64_fenv.h multiarray_api.txt noprefix.h npy_cpu.h npy_interrupt.h numpyconfig.h oldnumeric.h ufunc_api.txt utils.h arrayscalars.h __multiarray_api.h ndarrayobject.h npy_common.h npy_endian.h npy_math.h old_defines.h __ufunc_api.h ufuncobject.h * Thanks 2010/4/18 Pradeep Jha jh...@utias.utoronto.ca Hi, how do I figure where did my numpy got installed to? I downloaded a tar.gz file and then unzipped it at /nfs/carv/d1/people/pradeep/src/numpy-1.3.0/. I didn't do any additional installation steps. Also, just fyi, I don't have root access to this system. Thanks 2010/4/16 Robert Kern robert.k...@gmail.com On Fri, Apr 16, 2010 at 20:56, josef.p...@gmail.com wrote: On Fri, Apr 16, 2010 at 9:47 PM, Pradeep Jha jh...@utias.utoronto.ca wrote: Hi, before running the make command, it asks me to run the preconfig file. When I run preconfig, I get the following warning message during the run: checking for python2... /usr/bin/python2 Python command set by configure to /usr/bin/python2 WARNING: NUMPY include dir /nfs/carv/d1/people/pradeep/src/numpy-1.3.0//include/python does not exist. setting NUMPY_INC_DIR to /nfs/carv/d1/people/pradeep/src/numpy-1.3.0//include/python Is duplicate forward-slash legal in a Linux path? Yes. It is ignored. You need to set NUMPY_INC_DIR to $PYTHON_SITE_PACKAGES/numpy/core/include where $PYTHON_SITE_PACKAGES is the site-packages/ directory where your installation of numpy got installed to. Note that this is not /nfs/carv/d1/people/pradeep/src/numpy-1.3.0/. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion ___
Re: [Numpy-discussion] Numpy compilation error
On Sun, Apr 18, 2010 at 13:32, Pradeep Jha jh...@utias.utoronto.ca wrote: Hi, I am running python 2.4.4. I installed numpy using the command python setup.py install --prefix=$HOME/bin That's not a good prefix. --prefix=$HOME would be better. It will create, if necessary, bin/ and lib/ underneath that. my site-packages directory got installed to the following address: /nfs/carv/d1/people/pradeep/bin/lib/python2.4 in my preconfig file I changed the path to the following as you recommended # If numpy was installed using the --home option, set this to the # home directory for numpy. This will be needed for all numpy installations # that don't put the include files into python's native include directory. NUMPY_HOME=${NUMPY_HOME:=/nfs/carv/d1/people/pradeep/bin/lib/python2.4/site-packages/numpy/core/include} I still get the following warning message when I run the preconfig file: checking for python2... /usr/bin/python2 Python command set by configure to /usr/bin/python2 WARNING: NUMPY include dir /nfs/carv/d1/people/pradeep/bin/lib/python2.4/site-packages/numpy/core/include/include/python does not exist. setting NUMPY_INC_DIR to /nfs/carv/d1/people/pradeep/bin/lib/python2.4/site-packages/numpy/core/include/include/python Whats going wrong? The warning is right, as there is no directory called python on that address. You need to set the variable NUMPY_INC_DIR to '/nfs/carv/d1/people/pradeep/bin/lib/python2.4/site-packages/numpy/core/include/' or the equivalent if you decide to fix the --prefix as above. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Numpy compilation error
Hi, I am setting NUMPY_INC_DIR to what you said but still am getting the same error. Basically, there is no directory path like ***/include/python/*** anywhere in the installed numpy directory. whatever I am setting in my NUMPY_INC_DIR, the preconfig file tries to add a /include/python to that string and tries to locate that path, but fails. 2010/4/18 Robert Kern robert.k...@gmail.com On Sun, Apr 18, 2010 at 13:32, Pradeep Jha jh...@utias.utoronto.ca wrote: Hi, I am running python 2.4.4. I installed numpy using the command python setup.py install --prefix=$HOME/bin That's not a good prefix. --prefix=$HOME would be better. It will create, if necessary, bin/ and lib/ underneath that. my site-packages directory got installed to the following address: /nfs/carv/d1/people/pradeep/bin/lib/python2.4 in my preconfig file I changed the path to the following as you recommended # If numpy was installed using the --home option, set this to the # home directory for numpy. This will be needed for all numpy installations # that don't put the include files into python's native include directory. NUMPY_HOME=${NUMPY_HOME:=/nfs/carv/d1/people/pradeep/bin/lib/python2.4/site-packages/numpy/core/include} I still get the following warning message when I run the preconfig file: checking for python2... /usr/bin/python2 Python command set by configure to /usr/bin/python2 WARNING: NUMPY include dir /nfs/carv/d1/people/pradeep/bin/lib/python2.4/site-packages/numpy/core/include/include/python does not exist. setting NUMPY_INC_DIR to /nfs/carv/d1/people/pradeep/bin/lib/python2.4/site-packages/numpy/core/include/include/python Whats going wrong? The warning is right, as there is no directory called python on that address. You need to set the variable NUMPY_INC_DIR to '/nfs/carv/d1/people/pradeep/bin/lib/python2.4/site-packages/numpy/core/include/' or the equivalent if you decide to fix the --prefix as above. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Numpy compilation error
On Sun, Apr 18, 2010 at 19:49, Pradeep Jha jh...@utias.utoronto.ca wrote: Hi, I am setting NUMPY_INC_DIR to what you said but still am getting the same error. Basically, there is no directory path like ***/include/python/*** anywhere in the installed numpy directory. This is correct. No such directory should exist. whatever I am setting in my NUMPY_INC_DIR, the preconfig file tries to add a /include/python to that string and tries to locate that path, but fails. I am not familiar with the Cantera build process. You will probably need to ask the Cantera developers. You could probably replace the line in setup.py.in (sorry if this is not exactly right; I only downloaded the 1.7.0 sources, which still uses numarray): numpy_incl = @NUMPY_INC_DIR@ to: import numpy numpy_incl = numpy.get_include() Then the value of NUMPY_INC_DIR will not matter. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
[Numpy-discussion] Numpy compilation error
Hi, I am trying to install a software called Cantera which uses numpy. When I run the make command, during the installation it gives me the following error: */bin/rm -f _build (CXX=g++; export CXX; CC=g++; export CC; CFLAGS=-O3 -Wall -fPIC; export CFLAGS; PURIFY=; export PURIFY; /usr/bin/python2 setup.py build) Traceback (most recent call last): File setup.py, line 3, in ? from distutils.core import setup, Extension File /nfs/carv/d1/people/pradeep/src/numpy-1.3.0/numpy/distutils/__init__.py, line 6, in ? import ccompiler File /nfs/carv/d1/people/pradeep/src/numpy-1.3.0/numpy/distutils/ccompiler.py, line 7, in ? from distutils import ccompiler ImportError: cannot import name ccompiler make[1]: *** [_build] Error 1 make[1]: Leaving directory `/nfs/carv/d1/people/pradeep/cantera/Cantera/python' make: *** [python] Error 2* My numpy is stored in the following directory */nfs/carv/d1/people/pradeep/src/numpy-1.3.0/ *I am running Linux (Fedora). When I do a sys.path in command line Python, the output is: *['', '/nfs/carv/d1/people/pradeep/src/numpy-1.3.0', '/nfs/carv/d1/people/pradeep/src/numpy-1.3.0/numpy', '/nfs/carv/d1/people/pradeep/cantera', '/nfs/carv/d1/people/pradeep/cantera/bin', '/nfs/carv/d1/people/pradeep/cantera/build/bin/i686-pc-linux-gnu', '/nfs/carv/d1/people/pradeep/cantera/Cantera/python', '/nfs/carv/d1/people/pradeep/cantera/Cantera/python/build/lib.linux-i686-2.4/Cantera', '/nfs/carv/d1/people/pradeep/cantera/Cantera/python/Cantera', '/usr/lib/python24.zip', '/usr/lib/python2.4', '/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk', '/usr/lib/python2.4/lib-dynload', '/usr/lib/python2.4/site-packages', '/usr/lib/python2.4/site-packages/Numeric', '/usr/lib/python2.4/site-packages/gtk-2.0'] * I have a lot of unwanted directories as I was trying out different things. Any clues whats going wrong? Thanks ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Numpy compilation error
On Fri, Apr 16, 2010 at 17:59, Pradeep Jha jh...@utias.utoronto.ca wrote: Hi, I am trying to install a software called Cantera which uses numpy. When I run the make command, during the installation it gives me the following error: /bin/rm -f _build (CXX=g++; export CXX; CC=g++; export CC; CFLAGS=-O3 -Wall -fPIC; export CFLAGS; PURIFY=; export PURIFY; /usr/bin/python2 setup.py build) Traceback (most recent call last): File setup.py, line 3, in ? from distutils.core import setup, Extension File /nfs/carv/d1/people/pradeep/src/numpy-1.3.0/numpy/distutils/__init__.py, line 6, in ? import ccompiler File /nfs/carv/d1/people/pradeep/src/numpy-1.3.0/numpy/distutils/ccompiler.py, line 7, in ? from distutils import ccompiler ImportError: cannot import name ccompiler make[1]: *** [_build] Error 1 make[1]: Leaving directory `/nfs/carv/d1/people/pradeep/cantera/Cantera/python' make: *** [python] Error 2 My numpy is stored in the following directory /nfs/carv/d1/people/pradeep/src/numpy-1.3.0/ I am running Linux (Fedora). When I do a sys.path in command line Python, the output is: ['', '/nfs/carv/d1/people/pradeep/src/numpy-1.3.0', '/nfs/carv/d1/people/pradeep/src/numpy-1.3.0/numpy', You should not have these two entries in your sys.path. Did you add them yourself via PYTHONPATH? If so, remove them. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Numpy compilation error
Hi, I changed it. I am not getting that error anymore, but I get the following error: *running build running build_py running build_ext building 'Cantera._cantera' extension g++ -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -O3 -Wall -fPIC -fPIC -I../../build/include -Isrc -I../clib/src -I/nfs/carv/d1/people/pradeep/src/numpy-1.3.0//include/python -I/usr/include/python2.4 -c src/pycantera.cpp -o build/temp.linux-i686-2.4/src/pycantera.o src/pycantera.cpp:25:31: error: numpy/arrayobject.h: No such file or directory src/ctphase_methods.cpp: In function ‘PyObject* phase_getarray(PyObject*, PyObject*)’: src/ctphase_methods.cpp:126: error: ‘PyArrayObject’ was not declared in this scope src/ctphase_methods.cpp:126: error: ‘x’ was not declared in this scope src/ctphase_methods.cpp:132: error: ‘npy_intp’ was not declared in this scope ** ** ** ** *The pycantera.cpp file is at* /nfs/carv/d1/people/pradeep/cantera/Cantera/python/src* In the file pycantera.cpp, line number 30-31-32 say:* #ifdef HAS_NUMPY #include numpy/arrayobject.h #else* So the error is still with NUMPY somewhere. My sys.path in Python now shows: * ['', '/nfs/carv/d1/people/pradeep/cantera/Cantera/python/src', '/nfs/carv/d1/people/pradeep/cantera/bin', '/nfs/carv/d1/people/pradeep/cantera/build/bin/i686-pc-linux-gnu', '/nfs/carv/d1/people/pradeep/cantera/Cantera/python', '/nfs/carv/d1/people/pradeep/cantera/Cantera/python/build/lib.linux-i686-2.4/Cantera', '/nfs/carv/d1/people/pradeep/cantera/Cantera/python/Cantera', '/usr/lib/python24.zip', '/usr/lib/python2.4', '/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk', '/usr/lib/python2.4/lib-dynload', '/usr/lib/python2.4/site-packages', '/usr/lib/python2.4/site-packages/Numeric', '/usr/lib/python2.4/site-packages/gtk-2.0'] *In my bashrc file, the PATH variables are declared as follows: *export CANTERA_ROOT=$HOME/cantera export PATH=$JAVA_HOME/bin/:$HOME/src/$PATH:$CANTERA_ROOT/build/bin/i686-pc-linux-gnu/:$HOME/src/pdfjam/scripts export PYTHONPATH=$PYTHONPATH:$CANTERA_ROOT/bin:$CANTERA_ROOT/build/bin/i686-pc-linux-gnu:$CANTERA_ROOT/Cantera/python:$CANTERA_ROOT/Cantera/python/build/lib.linux-i686-2.4/Cantera:$CANTERA_ROOT/Cantera/python/Cantera: export Cantera_Path=$CANTERA_ROOT * I am not sure whats going wrong.* *Thanks for your help. 2010/4/16 Robert Kern robert.k...@gmail.com On Fri, Apr 16, 2010 at 17:59, Pradeep Jha jh...@utias.utoronto.ca wrote: Hi, I am trying to install a software called Cantera which uses numpy. When I run the make command, during the installation it gives me the following error: /bin/rm -f _build (CXX=g++; export CXX; CC=g++; export CC; CFLAGS=-O3 -Wall -fPIC; export CFLAGS; PURIFY=; export PURIFY; /usr/bin/python2 setup.py build) Traceback (most recent call last): File setup.py, line 3, in ? from distutils.core import setup, Extension File /nfs/carv/d1/people/pradeep/src/numpy-1.3.0/numpy/distutils/__init__.py, line 6, in ? import ccompiler File /nfs/carv/d1/people/pradeep/src/numpy-1.3.0/numpy/distutils/ccompiler.py, line 7, in ? from distutils import ccompiler ImportError: cannot import name ccompiler make[1]: *** [_build] Error 1 make[1]: Leaving directory `/nfs/carv/d1/people/pradeep/cantera/Cantera/python' make: *** [python] Error 2 My numpy is stored in the following directory /nfs/carv/d1/people/pradeep/src/numpy-1.3.0/ I am running Linux (Fedora). When I do a sys.path in command line Python, the output is: ['', '/nfs/carv/d1/people/pradeep/src/numpy-1.3.0', '/nfs/carv/d1/people/pradeep/src/numpy-1.3.0/numpy', You should not have these two entries in your sys.path. Did you add them yourself via PYTHONPATH? If so, remove them. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Numpy compilation error
On Fri, Apr 16, 2010 at 18:53, Pradeep Jha jh...@utias.utoronto.ca wrote: Hi, I changed it. I am not getting that error anymore, but I get the following error: running build running build_py running build_ext building 'Cantera._cantera' extension g++ -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -O3 -Wall -fPIC -fPIC -I../../build/include -Isrc -I../clib/src -I/nfs/carv/d1/people/pradeep/src/numpy-1.3.0//include/python -I/usr/include/python2.4 -c src/pycantera.cpp -o build/temp.linux-i686-2.4/src/pycantera.o src/pycantera.cpp:25:31: error: numpy/arrayobject.h: No such file or directory The error is with Cantera's setup.py, most likely. It is not providing the correct include path for numpy. Please show it. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Numpy compilation error
On Fri, Apr 16, 2010 at 9:47 PM, Pradeep Jha jh...@utias.utoronto.ca wrote: Hi, before running the make command, it asks me to run the preconfig file. When I run preconfig, I get the following warning message during the run: checking for python2... /usr/bin/python2 Python command set by configure to /usr/bin/python2 WARNING: NUMPY include dir /nfs/carv/d1/people/pradeep/src/numpy-1.3.0//include/python does not exist. setting NUMPY_INC_DIR to /nfs/carv/d1/people/pradeep/src/numpy-1.3.0//include/python Is duplicate forward-slash legal in a Linux path? Josef checking for matlab... /usr2/local_net1/bin/matlab checking MATLAB (/usr2/local_net1/bin/matlab)... /usr2/local_net1/bin/matlab In my preconfig file, there is a line where I am supposed to specify the numpy location, and I do it like this: # If numpy was installed using the --home option, set this to the # home directory for numpy. This will be needed for all numpy installations # that don't put the include files into python's native include directory. NUMPY_HOME=${NUMPY_HOME:=/nfs/carv/d1/people/pradeep/src/numpy-1.3.0/} I have attached setup.py file with this email Thank you so much. 2010/4/16 Robert Kern robert.k...@gmail.com On Fri, Apr 16, 2010 at 18:53, Pradeep Jha jh...@utias.utoronto.ca wrote: Hi, I changed it. I am not getting that error anymore, but I get the following error: running build running build_py running build_ext building 'Cantera._cantera' extension g++ -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -O3 -Wall -fPIC -fPIC -I../../build/include -Isrc -I../clib/src -I/nfs/carv/d1/people/pradeep/src/numpy-1.3.0//include/python -I/usr/include/python2.4 -c src/pycantera.cpp -o build/temp.linux-i686-2.4/src/pycantera.o src/pycantera.cpp:25:31: error: numpy/arrayobject.h: No such file or directory The error is with Cantera's setup.py, most likely. It is not providing the correct include path for numpy. Please show it. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] Numpy compilation error
On Fri, Apr 16, 2010 at 20:56, josef.p...@gmail.com wrote: On Fri, Apr 16, 2010 at 9:47 PM, Pradeep Jha jh...@utias.utoronto.ca wrote: Hi, before running the make command, it asks me to run the preconfig file. When I run preconfig, I get the following warning message during the run: checking for python2... /usr/bin/python2 Python command set by configure to /usr/bin/python2 WARNING: NUMPY include dir /nfs/carv/d1/people/pradeep/src/numpy-1.3.0//include/python does not exist. setting NUMPY_INC_DIR to /nfs/carv/d1/people/pradeep/src/numpy-1.3.0//include/python Is duplicate forward-slash legal in a Linux path? Yes. It is ignored. You need to set NUMPY_INC_DIR to $PYTHON_SITE_PACKAGES/numpy/core/include where $PYTHON_SITE_PACKAGES is the site-packages/ directory where your installation of numpy got installed to. Note that this is not /nfs/carv/d1/people/pradeep/src/numpy-1.3.0/. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion