pythonpython-2.7scitools

unable to import scitools python


I have just installed scitools-0.8 and I'm trying to import it using from scitools.std import *

but I get an error message saying

ImportError: No module named oldnumeric.mlab

numpy import filed!

see doc of scitools.numpytools module for how to choose Numeric instead.

I don't want to be using Numeric since the book I'm learning from uses numpy and I've read around and it seems that numpy doesn't support oldnumeric any more.

I don't know how to get scitools to work. I am using Python 2.7

There is a similar duplicate to this but the answer it has is basically just don't use scitools


Solution

  • The version of scitools you are using is ancient. Try cloning this repo and running [sudo] python setup.py install. The version number is 0.9.0, but some bug fixes have been pushed to the repo since its release. I just did this on Ubuntu 16.04, and running from scitools.std import * seems to work just fine.

    By the way, though, the form from XXX import * is generally NOT a good idea, as it pollutes the local namespace and can potentially overwrite other functions. Instead, try from scitools import std or import scitools.std as s so all the functions within that module are in their own namespace.