#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    9
    Rep Power
    0

    Problems with numpy


    Hi,
    I tried to run numpy, but get several problems.
    I work with the following s/w:
    OS - Window 7 professional
    Python v.3.3.2
    Numpy 1.7.0

    I installed Numpy and after python setup.py install
    copied a new folder Bulid\Numpy into C:\Python33\Lib\dite-packages

    But when I run any module from numpy:
    for example:
    import fft

    I have got the following error:
    ImportError: Error importing numpy: you should not try to import numpy from its source directory;
    please exit the numpy source tree,and relaunch you python interpreter from there


    Does anybody know how to solve this problem?

    Sincerely
    ok21
  2. #2
  3. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,900
    Rep Power
    481
    Change your directory before you import numpy.

    You can either change directory before you start python or after you start python you can
    Code:
    import os
    os.chdir(r'c:\Documents and Settings\Your Name\My Documents\My Sources\My python Sources')
    import numpy
    [code]Code tags[/code] are essential for python code and Makefiles!
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    9
    Rep Power
    0

    numpy installation problems


    Thank b4.....
    After runtime changing current dir. import numpy looks better.


    Now the is problem in the following block (numpy.__init.py__)
    try:
    from numpy.__config__ import show as show_config
    except ImportError:
    msg = """Error importing numpy: you should not try to import numpy from
    its source directory; please exit the numpy source tree, and relaunch
    your python intepreter from there."""
    raise ImportError(msg)

    because module numpy.__config__ is absent

    But very weird why after standard installation may be something same.
    I will try to comment all calls of function show from numpy.__config__ , but it is not good way.


    Thank you again
    ok21
  6. #4
  7. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2005
    Posts
    611
    Rep Power
    65
    Go to
    http://www.lfd.uci.edu/~gohlke/pythonlibs/
    and download the Windows installer
    numpy-MKL-1.7.1.win32-py3.3.exe
    Real Programmers always confuse Christmas and Halloween because Oct31 == Dec25
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    9
    Rep Power
    0
    Thank you Dietrich,
    Version numpy.1.7.1 works better than 1.7.0.

IMN logo majestic logo threadwatch logo seochat tools logo