scipy does not install

1,234 views
Skip to first unread message

vaimaro

unread,
May 16, 2017, 4:36:54 AM5/16/17
to thonny

Hello,
it is a great project!
However scipy does not install. I get this log:

Collecting scipy
  Downloading scipy-0.19.0.zip (15.3MB)
Installing collected packages: scipy
  Running setup.py install for scipy: started
    Running setup.py install for scipy: finished with status 'error'
    Complete output from command C:\Users\Namai\.thonny\BundledPython36\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Namai\\AppData\\Local\\Temp\\pip-build-vcphr4w6\\scipy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Namai\AppData\Local\Temp\pip-fjl7az0o-record\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\Namai\.thonny\BundledPython36\include\site\python3.6\scipy:
    
    Note: if you need reliable uninstall behavior, then install
    with pip instead of using `setup.py install`:
    
      - `pip install .`       (from a git repo or downloaded source
                               release)
      - `pip install scipy`   (last SciPy release on PyPI)
    
    
    lapack_opt_info:
    lapack_mkl_info:
      libraries mkl_rt not found in ['C:\\Users\\Namai\\.thonny\\BundledPython36\\lib', 'C:\\']
      NOT AVAILABLE
    
    openblas_lapack_info:
      libraries openblas not found in ['C:\\Users\\Namai\\.thonny\\BundledPython36\\lib', 'C:\\']
      NOT AVAILABLE
    
    atlas_3_10_threads_info:
    Setting PTATLAS=ATLAS
    C:\Users\Namai\.thonny\BundledPython36\lib\site-packages\numpy\distutils\system_info.py:1051: UserWarning: Specified path C:\projects\numpy-wheels\windows-wheel-builder\atlas-builds\atlas-3.10.1-sse2-32\lib is invalid.
      pre_dirs = system_info.get_paths(self, section, key)
    <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
      NOT AVAILABLE
    
    atlas_3_10_info:
    <class 'numpy.distutils.system_info.atlas_3_10_info'>
      NOT AVAILABLE
    
    atlas_threads_info:
    Setting PTATLAS=ATLAS
    <class 'numpy.distutils.system_info.atlas_threads_info'>
      NOT AVAILABLE
    
    atlas_info:
    <class 'numpy.distutils.system_info.atlas_info'>
      NOT AVAILABLE
    
    C:\Users\Namai\.thonny\BundledPython36\lib\site-packages\numpy\distutils\system_info.py:572: UserWarning:
        Atlas (http://math-atlas.sourceforge.net/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [atlas]) or by setting
        the ATLAS environment variable.
      self.calc_info()
    lapack_info:
      libraries lapack not found in ['C:\\Users\\Namai\\.thonny\\BundledPython36\\lib', 'C:\\']
      NOT AVAILABLE
    
    C:\Users\Namai\.thonny\BundledPython36\lib\site-packages\numpy\distutils\system_info.py:572: UserWarning:
        Lapack (http://www.netlib.org/lapack/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [lapack]) or by setting
        the LAPACK environment variable.
      self.calc_info()
    lapack_src_info:
      NOT AVAILABLE
    
    C:\Users\Namai\.thonny\BundledPython36\lib\site-packages\numpy\distutils\system_info.py:572: UserWarning:
        Lapack (http://www.netlib.org/lapack/) sources not found.
        Directories to search for the sources can be specified in the
        numpy/distutils/site.cfg file (section [lapack_src]) or by setting
        the LAPACK_SRC environment variable.
      self.calc_info()
      NOT AVAILABLE
    
    Running from scipy source directory.
    non-existing path in 'scipy\\integrate': 'quadpack.h'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Namai\AppData\Local\Temp\pip-build-vcphr4w6\scipy\setup.py", line 416, in <module>
        setup_package()
      File "C:\Users\Namai\AppData\Local\Temp\pip-build-vcphr4w6\scipy\setup.py", line 412, in setup_package
        setup(**metadata)
      File "C:\Users\Namai\.thonny\BundledPython36\lib\site-packages\numpy\distutils\core.py", line 135, in setup
        config = configuration()
      File "C:\Users\Namai\AppData\Local\Temp\pip-build-vcphr4w6\scipy\setup.py", line 336, in configuration
        config.add_subpackage('scipy')
      File "C:\Users\Namai\.thonny\BundledPython36\lib\site-packages\numpy\distutils\misc_util.py", line 1001, in add_subpackage
        caller_level = 2)
      File "C:\Users\Namai\.thonny\BundledPython36\lib\site-packages\numpy\distutils\misc_util.py", line 970, in get_subpackage
        caller_level = caller_level + 1)
      File "C:\Users\Namai\.thonny\BundledPython36\lib\site-packages\numpy\distutils\misc_util.py", line 907, in _get_configuration_from_setup_py
        config = setup_module.configuration(*args)
      File "scipy\setup.py", line 15, in configuration
        config.add_subpackage('linalg')
      File "C:\Users\Namai\.thonny\BundledPython36\lib\site-packages\numpy\distutils\misc_util.py", line 1001, in add_subpackage
        caller_level = 2)
      File "C:\Users\Namai\.thonny\BundledPython36\lib\site-packages\numpy\distutils\misc_util.py", line 970, in get_subpackage
        caller_level = caller_level + 1)
      File "C:\Users\Namai\.thonny\BundledPython36\lib\site-packages\numpy\distutils\misc_util.py", line 907, in _get_configuration_from_setup_py
        config = setup_module.configuration(*args)
      File "scipy\linalg\setup.py", line 20, in configuration
        raise NotFoundError('no lapack/blas resources found')
    numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
    
    ----------------------------------------
Command "C:\Users\Namai\.thonny\BundledPython36\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Namai\\AppData\\Local\\Temp\\pip-build-vcphr4w6\\scipy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Namai\AppData\Local\Temp\pip-fjl7az0o-record\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\Namai\.thonny\BundledPython36\include\site\python3.6\scipy" failed with error code 1 in C:\Users\Namai\AppData\Local\Temp\pip-build-vcphr4w6\scipy\


Return code: 

Thanks
Vaidotas

Aivar Annamaa

unread,
May 16, 2017, 4:56:01 AM5/16/17
to thonny
Hi Vaidotas!

SciPy is a quite complex package with many dependencies. Looks like it misses some dependencies that can't be installed automatically.

I would recommend installing a separate scientific Python distribution and make Thonny use this as a backend.  More info here: https://bitbucket.org/plas/thonny/wiki/InstallingPackages

best regards,
Aivar

Mr Mills

unread,
Jun 25, 2017, 8:14:07 AM6/25/17
to thonny
I was scratching my head with this as well! I'd installed Python 3.5, numpy, scipy, PyQt4 and matplotlib before I installed thonnyapp (with pip) but Thonny couldn't see any of the packages because it's using it's own built in interpreter. Just change Thonny's interpreter to your standard Python installation from 'Tools > Options > Interpreter'. I haven't tried installing any other packages with Thonny yet, but I might play it safe and install them with 'pip' at the command line to force 'pip' to run from my Python 3.5 installation.

Mark

eric marchand

unread,
May 8, 2019, 3:05:33 AM5/8/19
to thonny
Hi Aivar

I try to install libraries for my students, but I can not do it with Thonny. I do not have access to: https://bitbucket.org/plas/thonny/wiki/InstallingPackages
but I have a bitbucket account?
Thank you

Eric

Aivar Annamaa

unread,
May 8, 2019, 3:08:43 AM5/8/19
to thonny
Hi Eric,

I try to install libraries for my students, but I can not do it with Thonny. I do not have access to: https://bitbucket.org/plas/thonny/wiki/InstallingPackages
but I have a bitbucket account
 
Oops, looks like I have closed Bitbucket wiki too soon. The new location for this page is here: https://github.com/thonny/thonny/wiki/InstallingPackages

Best regards,
Aivar

eric marchand

unread,
May 8, 2019, 3:33:49 AM5/8/19
to thonny
Hi Aivar
Thank you for the answer and for the speed!
I can install libraries for thonny from Tools / Manages packages or with pip.
But my goal is to install these libraries on esp32. For information, it is the pygame library that I want to install. I can also make programs and run them on esp32.
Best regards,
Eric

Aivar Annamaa

unread,
May 8, 2019, 3:41:14 AM5/8/19
to thonny
Hi Eric,

I'm pretty sure neither NumPy nor PyGame work on esp32.

Best regards,
Aivar

eric marchand

unread,
May 8, 2019, 3:52:39 AM5/8/19
to thonny
Hi Aivar,
Argghh ... a pity.
What is surprising is that some libraries are already installed by default, for example "time". I can not "see" where they are installed. % lsdevice only sends me the files I dropped on the ESP32. I know we can drop a simple library like a my_lib.py file but not a folder?
So it is impossible to add libraries "classic" on an ESP32?
Thanks again.
Eric



Aivar Annamaa

unread,
May 8, 2019, 4:06:48 AM5/8/19
to thonny
I believe esp32 MicroPython also support custom packages (folders), but you need to use some other tool to create and upload them (eg. ampy). Next Thonny version will allow to create directories in MicroPython devices.

With NumPy and PyGame the problem is not their being packages instead of single files. The problem is that they are big libraries with OS and architecture dependent features. I'm not even sure if PyGame + NumPy would fit into average esp32 flash.

There has been discussions about creating a game library in CircuitPython community: https://github.com/adafruit/circuitpython/issues/899https://github.com/python-ugame/circuitpython-stage

Aivar

eric marchand

unread,
May 8, 2019, 8:36:52 AM5/8/19
to thonny
Hi Aivar,
Thanks for the links. I installed ampy. But I have the impression that it is made to run under linux, and not for windows commands because I can not do any basic command ... example: I installed ampy under cmd.exe windows
python -m pip install adafruit-ampy
But if I want to run it directly:
ampy --help
'ampy' is not recognized as a command or executable. And if I make it work via python:
Python -m ampy
'ampy' is a package and can not be executed directly.
I would have liked to try this tool, to understand a little better the structure of my esp32.
Have a good day
Eric

Aivar Annamaa

unread,
May 8, 2019, 9:13:59 AM5/8/19
to thonny
Check into your Python's "Scripts" directory. But I think we should stop this thread, at least in the forum, because it's not really specific to Thonny.

Best regards,
Aivar

eric marchand

unread,
May 8, 2019, 9:17:10 AM5/8/19
to thonny
Thanks
Reply all
Reply to author
Forward
0 new messages