Re: [Numpy-discussion] building numpy/scipy
I do not have cygwin in my windows path, so I guess that's already hidden. I patched d:\programs\python25\lib\distutils\cygwinccompiler.py, line 424 to read ld_version = StrictVersion(result.group(1).rsplit('.',1)[0]) but I still got crash and a traceback. David Cournapeau suggested using the scipy superpack, so i tried scipy-0.7.0b1-win32-superpack-python2.5.exe. If there were errors I wouldn't know about them, but running 'python -c 'import scipy; print scipy.__version__ ' produces a version number (0.7.0.dev5180 ... not exactly the 0.7.0b1 you'd expect, but not a stack trace either). Now all I have to do is find some test cases so I can verify a little deeper than the version number. I guess I'll avoid source (seutp.py) installations like the plague from now on. The MKL libs are being ignored, but it seems like I have an environment running. Thanks to all who provided suggestions, particularly David Cournapeau. At 01:30 AM 1/3/2009, you wrote: On Sat, Jan 3, 2009 at 1:07 AM, Mike Landis mlandis...@comcast.net wrote: Cygwin is present, so not just the dumbed down Windows CMD available. I ran the numpy-1.2.1 superpak. Verified that it installed (cause you don't get near as much output as you do from a shell prompt) by running: python -c 'import numpy; print numpy.__version__ ' and got the numpy version number back. Found the site.cfg that the installer left in the numpy package directory (it picked up on my ATLAS install, but not on MKL) and copied it into d:\temp\scipy-0.7.0b1 and ran python setup.py install there. Lots of positive looking output, but it ultimately crapped out. Here's the tail end of that transcript: copying scipy\weave\__init__.py - build\lib.win32-2.5\scipy\weave running build_clib Traceback (most recent call last): File setup.py, line 92, in module setup_package() File setup.py, line 84, in setup_package configuration=configuration ) File d:\Programs\Python25\lib\site-packages\numpy\distutils\core.py, line 184, in setup return old_setup(**new_attr) File d:\programs\python25\lib\distutils\core.py, line 151, in setup dist.run_commands() File d:\programs\python25\lib\distutils\dist.py, line 974, in run_commands self.run_command(cmd) File d:\programs\python25\lib\distutils\dist.py, line 994, in run_command cmd_obj.run() File d:\Programs\Python25\lib\site-packages\numpy\distutils\command\install.py, line 49, in run r = old_install.run(self) File d:\programs\python25\lib\distutils\command\install.py, line 506, in run self.run_command('build') File d:\programs\python25\lib\distutils\cmd.py, line 333, in run_command self.distribution.run_command(command) File d:\programs\python25\lib\distutils\dist.py, line 994, in run_command cmd_obj.run() File d:\Programs\Python25\lib\site-packages\numpy\distutils\command\build.py, line 37, in run old_build.run(self) File d:\programs\python25\lib\distutils\command\build.py, line 112, in run self.run_command(cmd_name) File d:\programs\python25\lib\distutils\cmd.py, line 333, in run_command self.distribution.run_command(command) File d:\programs\python25\lib\distutils\dist.py, line 994, in run_command cmd_obj.run() File d:\Programs\Python25\lib\site-packages\numpy\distutils\command\build_clib.py, line 63, in run force=self.force) File d:\Programs\Python25\lib\site-packages\numpy\distutils\ccompiler.py, line 366, in new_compiler compiler = klass(None, dry_run, force) File d:\Programs\Python25\lib\site-packages\numpy\distutils\mingw32ccompiler.py, line 46, in __init__ verbose,dry_run, force) File d:\programs\python25\lib\distutils\cygwinccompiler.py, line 84, in __init__ get_versions() File d:\programs\python25\lib\distutils\cygwinccompiler.py, line 424, in get_versions ld_version = StrictVersion(result.group(1)) File d:\programs\python25\lib\distutils\version.py, line 40, in __init__ self.parse(vstring) File d:\programs\python25\lib\distutils\version.py, line 107, in parse raise ValueError, invalid version number '%s' % vstring ValueError: invalid version number '2.18.50.20080625' ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion If you want to get around this bug, you could correct the version parsing, change in File d:\programs\python25\lib\distutils\cygwinccompiler.py, line 424, in get_versions ld_version = StrictVersion(result.group(1)) to ld_version = StrictVersion(result.group(1).rsplit('.',1)[0]) see version problem from distutils.version import StrictVersion StrictVersion('2.18.50.20080625') Traceback (most recent call last): File pyshell#246, line 1, in module StrictVersion('2.18.50.20080625') File C:\Programs\Python25\lib\distutils\version.py, line 40, in __init__ self.parse(vstring) File C:\Programs\Python25\lib\distutils\version.py, line 107, in parse raise ValueError, invalid version number '%s' % vstring ValueError: invalid version
Re: [Numpy-discussion] building numpy/scipy
On Sat, Jan 3, 2009 at 10:13 AM, Mike Landis mlandis...@comcast.net wrote: I do not have cygwin in my windows path, so I guess that's already hidden. I patched d:\programs\python25\lib\distutils\cygwinccompiler.py, line 424 to read ld_version = StrictVersion(result.group(1).rsplit('.',1)[0]) but I still got crash and a traceback. David Cournapeau suggested using the scipy superpack, so i tried scipy-0.7.0b1-win32-superpack-python2.5.exe. If there were errors I wouldn't know about them, but running 'python -c 'import scipy; print scipy.__version__ ' produces a version number (0.7.0.dev5180 ... not exactly the 0.7.0b1 you'd expect, but not a stack trace either). Now all I have to do is find some test cases so I can verify a little deeper than the version number. If you have nose installed, you can run the scipy test suite with import scipy scipy.test() Josef ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
[Numpy-discussion] genloadtxt : ready for inclusion
All, You'll probably remember that last December, I started rewriting np.loadtxt and ame up with a series of functions that support missing data. I tried to copy/paste the code in numpy.lib.io.py but ran into dependency problems and left it at that. I think that part of the reason is that the code relies on numpy.ma which can't be loaded when numpy.lib gets loaded. As I needed a way to grant access to the code to anybody, I created a small project on launchpad: you can access it to: https://code.launchpad.net/~pierregm/numpy/numpy_addons The loadtxt reimplementation functions can be found in the numpy.io.fromascii module, their unittest in the corresponding test directory. In addition, you'll find several other functions and their unittest to manipulate arrays w/ flexible data-type. They are basically rewritten version of some functions in matplotlib.mlab. Would anybody be willing to try inserting the new functions in numpy ? I was hoping the genfromtxt and consorts would make it to numpy 1.3.x (I'd need the code for the scikits.timeseries package). As usual, I'd need all the feedback you can share. Thanks a lot in advance. P. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] building numpy/scipy
Thanks for the suggestion Joseph - the scipy test suite runs, but it produces lots of errors. Some deprecation warnings in numpy\lib\utils.py (line 110) and scipy\linalg\decomp.py (line 1173) Than it complains about a '_bad_path_' (doesn't exist or not writable). Couldn't remove user\appdata]local\temp\tmpc192_pcat_test (directory not empty) Then the crap hits the fan... the following crashes are all due to: test_polyint.CheckKrogh test_derivative crashes on line 38 of scipy\interpolate\tests\test_polyint.py test_derivatives crashes on line 26 test_empty crashes in the same file on line 73 test_hermite crashes in the same file on line 57 test_high_derivative crashes in the same file on line 44 test_lagrange crashes in the same file on line 19 test_low_derivatives crashes in the same file line 32 test_scalar on line 22 test_shapes_1d_vectorvalue on line 95 test_shapes_scalarvalue on line 76 test_shapes_scalarvalue_derivative on line 82 test_shapes_vectorvalue on line 89 test_shapes_vectorvalue_derivative on line 101 test_vector on line 63 test_wrapper on line 108 The following crashes are due to test_polyint.CheckPiecewise test_construction on line 186 test_derivative on line 193 test_derivatives on line 196 test_incremental on line 217 test_scalar on line 189 test_shapes_scalarvalue on line 221 test_shapes_scalarvalue_derivative on line 227 test_shapes_vectorvalue on line 235 test_shapes_vectorvalue_1d on line 242 test_shapes_vectorvalue_derivative on line 248 test_vector on line 205 test_wrapper on line 255 The following crashes are due to test_polyint.CheckTaylor test_exponential on line 116 Failure: AttributeError ('module' object has no attribute 'byteordercodes') nose-0.10.30py2.5.egg\nose\loader.py on line 364 in loadTestsFromName Failure: ImportError (cannot import name numpyio) nose-0.10.30py2.5.egg\nose\loader.py on line 364 in loadTestsFromName Failure: ImportError (cannot import name fblas) nose-0.10.30py2.5.egg\nose\loader.py on line 364 in loadTestsFromName Failure: ImportError (cannot import name flapack) nose-0.10.30py2.5.egg\nose\loader.py on line 364 in loadTestsFromName Failure: ImportError (cannot import name fblas) AGAIN nose-0.10.30py2.5.egg\nose\loader.py on line 364 in loadTestsFromName Failure: ImportError (cannot import name flapack) AGAIN nose-0.10.30py2.5.egg\nose\loader.py on line 364 in loadTestsFromName Failure: NameError (name 'pilutil is not defined) nose-0.10.30py2.5.egg\nose\loader.py on line 364 in loadTestsFromName Failure: ImportError (cannot import name cobyla) nose-0.10.30py2.5.egg\nose\loader.py on line 364 in loadTestsFromName Failure: ImportError (cannot import name nonlin) nose-0.10.30py2.5.egg\nose\loader.py on line 364 in loadTestsFromName Failure: ImportError (cannot import name zeros) nose-0.10.30py2.5.egg\nose\loader.py on line 364 in loadTestsFromName Failure: NameError (name 'pilutil is not defined) nose-0.10.30py2.5.egg\nose\loader.py on line 364 in loadTestsFromName Failure: ImportError (cannot import name linsolve) nose-0.10.30py2.5.egg\nose\loader.py on line 364 in loadTestsFromName Failure: AttributeError ('module' object has no attribute '_cephes') nose-0.10.30py2.5.egg\nose\loader.py on line 364 in loadTestsFromName Failure: NameError (name 'pilutil is not defined) nose-0.10.30py2.5.egg\nose\loader.py on line 364 in loadTestsFromName Failure: AttributeError ('module' object has no attribute 'convolve') nose-0.10.30py2.5.egg\nose\loader.py on line 364 in loadTestsFromName That was with nose-0.10.3-py2.5. I upgrades to the latest nose-0.10.4-py2.5, but it still produced an armload of (what look like the same) errors. Does this symptomology point to anything (configuration error, package out of date, ???) At 10:50 AM 1/3/2009, you wrote: On Sat, Jan 3, 2009 at 10:13 AM, Mike Landis mlandis...@comcast.net wrote: I do not have cygwin in my windows path, so I guess that's already hidden. I patched d:\programs\python25\lib\distutils\cygwinccompiler.py, line 424 to read ld_version = StrictVersion(result.group(1).rsplit('.',1)[0]) but I still got crash and a traceback. David Cournapeau suggested using the scipy superpack, so i tried scipy-0.7.0b1-win32-superpack-python2.5.exe. If there were errors I wouldn't know about them, but running 'python -c 'import scipy; print scipy.__version__ ' produces a version number (0.7.0.dev5180 ... not exactly the 0.7.0b1 you'd expect, but not a stack trace either). Now all I have to do is find some test cases so I can verify a little deeper than the version number. If you have nose installed, you can run the scipy test suite with import scipy scipy.test() Josef ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database:
Re: [Numpy-discussion] building numpy/scipy
Make sure that when you import scipy that you get the correct version. import scipy scipy.__file__ 'C:\\Programs\\Python25\\lib\\site-packages\\scipy\\__init__.pyc' From your error messages, I would think python is loading the source distribution and not the compiled and installed version. It would be helpful to see your actual error messages from nose, with copy and paste, at least the first few and last parts of the nose tests. Your summary error message is not very helpful because it doesn't show your actual error path and trace backs. When I installed the 0.7.0 b1 superpack on WindowsXP, it worked out of the box. The only thing to do, before installing a new version of numpy or scipy, is to uninstall or delete any old version in site-packages, since the directory names of scipy and numpy do not include version numbers. Installing on top of an old version, can leave some old files around which sometimes cause errors. Josef ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] building numpy/scipy
Josef (sorry about spelling your name wrong in a previous post), Thanks for the continued suggestions. I deleted the site-packages: numpy and scipy, and reinstalled each using the current release superpacks (numpy first, then scipy). then I ran: python -c 'import numpy; numpy.test()' and got: Running unit tests for numpy NumPy version 1.2.1 NumPy is installed in d::\Programs\Python25\lib\site-packages\numpy Python version 2.5.2 (r252:60911, Mar 27 2008, 17:57:18) IMSC v.1310 32 bit (ntel)] nose version 0.10.4 Traceback (most recent call last): File (string), line 1, in module File d::\Programs\Python25\lib\site-packages\numpy\testing\nosetester.py, line 264, in test import doctest Filed:\Programs\Python25\lib\doctest.p, line 99, in module import unittest, difflib, pd, tempfile File d:\programs\python25\lib\tempfile.py, line 33, in module from random import Random as __Random ImportError: cannot import name Random scipy.test() bombs out with the exact same Traceback, except that it mentions the scipy version (0,7.0.dev5180) and scipy install directory just before it echoes the line with the python version number. So, it's not getting as far as it was with the source mixed in. At 10:40 PM 1/3/2009, you wrote: Make sure that when you import scipy that you get the correct version. import scipy scipy.__file__ 'C:\\Programs\\Python25\\lib\\site-packages\\scipy\\__init__.pyc' From your error messages, I would think python is loading the source distribution and not the compiled and installed version. It would be helpful to see your actual error messages from nose, with copy and paste, at least the first few and last parts of the nose tests. Your summary error message is not very helpful because it doesn't show your actual error path and trace backs. When I installed the 0.7.0 b1 superpack on WindowsXP, it worked out of the box. The only thing to do, before installing a new version of numpy or scipy, is to uninstall or delete any old version in site-packages, since the directory names of scipy and numpy do not include version numbers. Installing on top of an old version, can leave some old files around which sometimes cause errors. Josef ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] building numpy/scipy
On Sat, Jan 3, 2009 at 22:20, Mike Landis mlandis...@comcast.net wrote: Josef (sorry about spelling your name wrong in a previous post), Thanks for the continued suggestions. I deleted the site-packages: numpy and scipy, and reinstalled each using the current release superpacks (numpy first, then scipy). then I ran: python -c 'import numpy; numpy.test()' and got: Running unit tests for numpy NumPy version 1.2.1 NumPy is installed in d::\Programs\Python25\lib\site-packages\numpy Python version 2.5.2 (r252:60911, Mar 27 2008, 17:57:18) IMSC v.1310 32 bit (ntel)] nose version 0.10.4 Traceback (most recent call last): File (string), line 1, in module File d::\Programs\Python25\lib\site-packages\numpy\testing\nosetester.py, line 264, in test import doctest Filed:\Programs\Python25\lib\doctest.p, line 99, in module import unittest, difflib, pd, tempfile File d:\programs\python25\lib\tempfile.py, line 33, in module from random import Random as __Random ImportError: cannot import name Random What directory are you in? I'm guessing that you are in a numpy/ directory either in the source tree or under site-packages/. Change out of that directory. Python looks for modules in the current directory before the standard locations, so it's picking up the numpy.random subpackage instead of the standard library module random. -- 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://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] building numpy/scipy
On Sat, Jan 3, 2009 at 22:38, Mike Landis mlandis...@comcast.net wrote: Maybe the following will also be useful... Recall that I completely deleted numpy and scipy and reinstalled each from their respective superpacks, then ran: import numpy; numpy.__file__ 'D:\\Programs\\Python25\\lib\\site-packages\\numpy\\__init__.pyc' import scipy; scipy.__file__ 'D:\\Programs\\Python25\\lib\\site-packages\\scipy\\__init__.pyc' $ cd site-packages\numpy; python setup.py config This is the wrong setup.py file to run That message is correct. Don't do that. You don't run the setup.py scripts on installed binaries. $ cd site-packages\scipy; python setup.py config Don't do that either. -- 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://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] building numpy/scipy
On Sat, Jan 3, 2009 at 11:42 PM, Robert Kern robert.k...@gmail.com wrote: On Sat, Jan 3, 2009 at 22:38, Mike Landis mlandis...@comcast.net wrote: Maybe the following will also be useful... Recall that I completely deleted numpy and scipy and reinstalled each from their respective superpacks, then ran: import numpy; numpy.__file__ 'D:\\Programs\\Python25\\lib\\site-packages\\numpy\\__init__.pyc' import scipy; scipy.__file__ 'D:\\Programs\\Python25\\lib\\site-packages\\scipy\\__init__.pyc' $ cd site-packages\numpy; python setup.py config This is the wrong setup.py file to run That message is correct. Don't do that. You don't run the setup.py scripts on installed binaries. $ cd site-packages\scipy; python setup.py config Don't do that either. -- 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://projects.scipy.org/mailman/listinfo/numpy-discussion Mike, don't go in site-packages at all, except for browsing and looking at the source for information. basic steps: run installer go to a working directory, not under the python directory in programs, (and without any scipy, numpy source in it) then start python or idle there and then import numpy and scipy and test, that's it. Unless there is a reason for you to change the numpy, scipy source there is no reason for you to touch any of the config, compile build steps. They are for later, when you need additional packages that don't have an installer. To get up and running, I recommend just to follow the basic steps for a user. Josef ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] building numpy/scipy
On Sun, Jan 4, 2009 at 1:38 PM, Mike Landis mlandis...@comcast.net wrote: Maybe the following will also be useful... Recall that I completely deleted numpy and scipy and reinstalled each from their respective superpacks, then ran: import numpy; numpy.__file__ 'D:\\Programs\\Python25\\lib\\site-packages\\numpy\\__init__.pyc' import scipy; scipy.__file__ 'D:\\Programs\\Python25\\lib\\site-packages\\scipy\\__init__.pyc' At this stage, you're *done*. Everything is installed, you don't have to do anything anymore. I am sorry if the following is obvious, but that's the only explanation I can make: there are two ways to install open source softwares - from sources, or from binary installers. By using the superpack, you are using the later - using setup.py implied the former. So what you end up doing is to try building the software from the binary - which does not make sense. It may not look like it at this point, but you are making things much more complicate than they really are :) After the super pack executions, you have run the installers successfully, so everything is installed, without any further step to follow. cheers, David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] building numpy/scipy
I cd'd out of numpy and site-packages and re-ran the package tests. both numpy.test() and scipy.test() ran without serious errors. Some DeprecationWarnings and integrals that are probably divergent or slowly convergent... It's looking much more promising. Two gotchas on top of each other - not deleting the previously existing source, and running scripts from within the site-packages directory. Whew! numpy/scipy was looking scarily unstable until discovering my install and pilot errors. Thanks for all of the help ... ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Re: [Numpy-discussion] building numpy/scipy
Mike Landis wrote: I cd'd out of numpy and site-packages and re-ran the package tests. both numpy.test() and scipy.test() ran without serious errors. Some DeprecationWarnings and integrals that are probably divergent or slowly convergent... It's looking much more promising. Two gotchas on top of each other - not deleting the previously existing source, and running scripts from within the site-packages directory. Whew! numpy/scipy was looking scarily unstable until discovering my install and pilot errors. Glad it is working for you. We are sorry about the installation issues: we know things could be better, and we hope to improve things on that front - they have improved quite a bit already. cheers, David ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion