hercules icon indicating copy to clipboard operation
hercules copied to clipboard

pip3 install labours fails on Linux

Open jesuswasrasta opened this issue 3 years ago • 10 comments

I'm on KDE Neon (Ubuntu 20.04LTS based).

pip3 install labours fails with the message below (sorry, it's long):

`Building wheels for collected packages: scipy Building wheel for scipy (setup.py) ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ow2zb3l9/scipy/setup.py'"'"'; file='"'"'/tmp/pip-install-ow2zb3l9/scipy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-d3ia2upg
cwd: /tmp/pip-install-ow2zb3l9/scipy/
Complete output (98 lines):
/tmp/pip-install-ow2zb3l9/scipy/setup.py:114: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
Running from scipy source directory.
lapack_opt_info:
lapack_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE

openblas_lapack_info:
libraries openblas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE

openblas_clapack_info:
libraries openblas,lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE

flame_info:
libraries flame not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE

atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
libraries lapack_atlas not found in /usr/local/lib
libraries tatlas,tatlas not found in /usr/local/lib
libraries lapack_atlas not found in /usr/lib
libraries tatlas,tatlas not found in /usr/lib
libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
libraries tatlas,tatlas not found in /usr/lib/x86_64-linux-gnu
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
NOT AVAILABLE

atlas_3_10_info:
libraries lapack_atlas not found in /usr/local/lib
libraries satlas,satlas not found in /usr/local/lib
libraries lapack_atlas not found in /usr/lib
libraries satlas,satlas not found in /usr/lib
libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
libraries satlas,satlas not found in /usr/lib/x86_64-linux-gnu
<class 'numpy.distutils.system_info.atlas_3_10_info'>
NOT AVAILABLE

atlas_threads_info:
Setting PTATLAS=ATLAS
libraries lapack_atlas not found in /usr/local/lib
libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
libraries lapack_atlas not found in /usr/lib
libraries ptf77blas,ptcblas,atlas not found in /usr/lib
libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
libraries ptf77blas,ptcblas,atlas not found in /usr/lib/x86_64-linux-gnu
<class 'numpy.distutils.system_info.atlas_threads_info'>
NOT AVAILABLE

atlas_info:
libraries lapack_atlas not found in /usr/local/lib
libraries f77blas,cblas,atlas not found in /usr/local/lib
libraries lapack_atlas not found in /usr/lib
libraries f77blas,cblas,atlas not found in /usr/lib
libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu
libraries f77blas,cblas,atlas not found in /usr/lib/x86_64-linux-gnu
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE

accelerate_info:
NOT AVAILABLE

lapack_info:
libraries lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']
NOT AVAILABLE

/usr/local/lib/python3.8/dist-packages/numpy/distutils/system_info.py:1748: 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.
return getattr(self, 'calc_info{}'.format(name))()
lapack_src_info:
NOT AVAILABLE

/usr/local/lib/python3.8/dist-packages/numpy/distutils/system_info.py:1748: 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.
return getattr(self, 'calc_info{}'.format(name))()
NOT AVAILABLE

Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-ow2zb3l9/scipy/setup.py", line 492, in
setup_package()
File "/tmp/pip-install-ow2zb3l9/scipy/setup.py", line 488, in setup_package
setup(**metadata)
File "/usr/local/lib/python3.8/dist-packages/numpy/distutils/core.py", line 135, in setup
config = configuration()
File "/tmp/pip-install-ow2zb3l9/scipy/setup.py", line 395, in configuration
raise NotFoundError(msg)
numpy.distutils.system_info.NotFoundError: No lapack/blas resources found.

ERROR: Failed building wheel for scipy Running setup.py clean for scipy ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ow2zb3l9/scipy/setup.py'"'"'; file='"'"'/tmp/pip-install-ow2zb3l9/scipy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' clean --all
cwd: /tmp/pip-install-ow2zb3l9/scipy
Complete output (11 lines):
/tmp/pip-install-ow2zb3l9/scipy/setup.py:114: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp

setup.py clean is not supported, use one of the following instead:

- `git clean -xdf` (cleans all files)                                                                                                                                                        
- `git clean -Xdf` (cleans all versioned files, doesn't touch                                                                                                                                
                    files that aren't checked into the git repo)                                                                                                                             
                                                                                                                                                                                             

Add --force to your command to use it anyway if you must (unsupported).


ERROR: Failed cleaning build dir for scipy Failed to build scipy Installing collected packages: joblib, cython, scipy, scikit-learn, hdbscan, patsy, future, autograd, autograd-gamma, lifelines, labours Attempting uninstall: scipy Found existing installation: scipy 1.5.2 Uninstalling scipy-1.5.2: Successfully uninstalled scipy-1.5.2 Running setup.py install for scipy ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ow2zb3l9/scipy/setup.py'"'"'; file='"'"'/tmp/pip-install-ow2zb3l9/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 /tmp/pip-record-7zy4tbys/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/nando/.local/include/python3.8/scipy
cwd: /tmp/pip-install-ow2zb3l9/scipy/
Complete output (107 lines):
/tmp/pip-install-ow2zb3l9/scipy/setup.py:114: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp

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)                                                                                                                                       
                                                                                                                                                                                             
                                                                                                                                                                                             
Running from scipy source directory.                                                                                                                                                         
lapack_opt_info:                                                                                                                                                                             
lapack_mkl_info:                                                                                                                                                                             
customize UnixCCompiler                                                                                                                                                                      
  libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']                                                                                                  
  NOT AVAILABLE                                                                                                                                                                              
                                                                                                                                                                                             
openblas_lapack_info:                                                                                                                                                                        
  libraries openblas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']                                                                                                
  NOT AVAILABLE                                                                                                                                                                              
                                                                                                                                                                                             
openblas_clapack_info:                                                                                                                                                                       
  libraries openblas,lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']                                                                                         
  NOT AVAILABLE                                                                                                                                                                              
                                                                                                                                                                                             
flame_info:                                                                                                                                                                                  
  libraries flame not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']                                                                                                   
  NOT AVAILABLE                                                                                                                                                                              
                                                                                                                                                                                             
atlas_3_10_threads_info:                                                                                                                                                                     
Setting PTATLAS=ATLAS                                                                                                                                                                        
  libraries lapack_atlas not found in /usr/local/lib                                                                                                                                         
  libraries tatlas,tatlas not found in /usr/local/lib                                                                                                                                        
  libraries lapack_atlas not found in /usr/lib                                                                                                                                               
  libraries tatlas,tatlas not found in /usr/lib                                                                                                                                              
  libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu                                                                                                                              
  libraries tatlas,tatlas not found in /usr/lib/x86_64-linux-gnu                                                                                                                             
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>                                                                                                                                
  NOT AVAILABLE                                                                                                                                                                              
                                                                                                                                                                                             
atlas_3_10_info:                                                                                                                                                                             
  libraries lapack_atlas not found in /usr/local/lib                                                                                                                                         
  libraries satlas,satlas not found in /usr/local/lib                                                                                                                                        
  libraries lapack_atlas not found in /usr/lib                                                                                                                                               
  libraries satlas,satlas not found in /usr/lib                                                                                                                                              
  libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu                                                                                                                              
  libraries satlas,satlas not found in /usr/lib/x86_64-linux-gnu                                                                                                                             
<class 'numpy.distutils.system_info.atlas_3_10_info'>                                                                                                                                        
  NOT AVAILABLE                                                                                                                                                                              
                                                                                                                                                                                             
atlas_threads_info:                                                                                                                                                                          
Setting PTATLAS=ATLAS                                                                                                                                                                        
  libraries lapack_atlas not found in /usr/local/lib                                                                                                                                         
  libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib                                                                                                                              
  libraries lapack_atlas not found in /usr/lib                                                                                                                                               
  libraries ptf77blas,ptcblas,atlas not found in /usr/lib                                                                                                                                    
  libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu                                                                                                                              
  libraries ptf77blas,ptcblas,atlas not found in /usr/lib/x86_64-linux-gnu                                                                                                                   
<class 'numpy.distutils.system_info.atlas_threads_info'>                                                                                                                                     
  NOT AVAILABLE                                                                                                                                                                              
                                                                                                                                                                                             
atlas_info:                                                                                                                                                                                  
  libraries lapack_atlas not found in /usr/local/lib                                                                                                                                         
  libraries f77blas,cblas,atlas not found in /usr/local/lib                                                                                                                                  
  libraries lapack_atlas not found in /usr/lib                                                                                                                                               
  libraries f77blas,cblas,atlas not found in /usr/lib                                                                                                                                        
  libraries lapack_atlas not found in /usr/lib/x86_64-linux-gnu                                                                                                                              
  libraries f77blas,cblas,atlas not found in /usr/lib/x86_64-linux-gnu                                                                                                                       
<class 'numpy.distutils.system_info.atlas_info'>                                                                                                                                             
  NOT AVAILABLE                                                                                                                                                                              
                                                                                                                                                                                             
accelerate_info:                                                                                                                                                                             
  NOT AVAILABLE                                                                                                                                                                              
                                                                                                                                                                                             
lapack_info:                                                                                                                                                                                 
  libraries lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu']                                                                                                  
  NOT AVAILABLE                                                                                                                                                                              
                                                                                                                                                                                             
/usr/local/lib/python3.8/dist-packages/numpy/distutils/system_info.py:1748: 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.                                                                                                                                                         
  return getattr(self, '_calc_info_{}'.format(name))()                                                                                                                                       
lapack_src_info:                                                                                                                                                                             
  NOT AVAILABLE                                                                                                                                                                              
                                                                                                                                                                                             
/usr/local/lib/python3.8/dist-packages/numpy/distutils/system_info.py:1748: 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.                                                                                                                                                     
  return getattr(self, '_calc_info_{}'.format(name))()                                                                                                                                       
  NOT AVAILABLE                                                                                                                                                                              
                                                                                                                                                                                             
Traceback (most recent call last):                                                                                                                                                           
  File "<string>", line 1, in <module>                                                                                                                                                       
  File "/tmp/pip-install-ow2zb3l9/scipy/setup.py", line 492, in <module>                                                                                                                     
    setup_package()                                                                                                                                                                          
  File "/tmp/pip-install-ow2zb3l9/scipy/setup.py", line 488, in setup_package                                                                                                                
    setup(**metadata)                                                                                                                                                                        
  File "/usr/local/lib/python3.8/dist-packages/numpy/distutils/core.py", line 135, in setup                                                                                                  
    config = configuration()                                                                                                                                                                 
  File "/tmp/pip-install-ow2zb3l9/scipy/setup.py", line 395, in configuration                                                                                                                
    raise NotFoundError(msg)                                                                                                                                                                 
numpy.distutils.system_info.NotFoundError: No lapack/blas resources found.                                                                                                                   
----------------------------------------                                                                                                                                                     

Rolling back uninstall of scipy Moving to /home/nando/.local/lib/python3.8/site-packages/scipy-1.5.2.dist-info/ from /home/nando/.local/lib/python3.8/site-packages/~cipy-1.5.2.dist-info Moving to /home/nando/.local/lib/python3.8/site-packages/scipy.libs/ from /home/nando/.local/lib/python3.8/site-packages/~cipy.libs Moving to /home/nando/.local/lib/python3.8/site-packages/scipy/ from /home/nando/.local/lib/python3.8/site-packages/~cipy ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ow2zb3l9/scipy/setup.py'"'"'; file='"'"'/tmp/pip-install-ow2zb3l9/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 /tmp/pip-record-7zy4tbys/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/nando/.local/include/python3.8/scipy Check the logs for full command output.

Even pip3 install scipy fails.
I solved installing these dependencies: sudo apt-get install libatlas-base-dev gfortran

jesuswasrasta avatar Sep 21 '20 12:09 jesuswasrasta

Same thing on Mac

DanielRivasMD avatar Sep 28 '20 19:09 DanielRivasMD

here is osx catalina output

% pip3 install labours
Collecting labours
  Using cached labours-10.7.2-py3-none-any.whl (69 kB)
Collecting fastdtw<2.0,>=0.3.2
  Using cached fastdtw-0.3.4.tar.gz (133 kB)
Requirement already satisfied: protobuf<4.0,>=3.5.0 in /usr/local/lib/python3.9/site-packages (from labours) (3.14.0)
Collecting munch<3.0,>=2.0
  Using cached munch-2.5.0-py2.py3-none-any.whl (10 kB)
Collecting matplotlib<4.0,>=2.0
  Using cached matplotlib-3.3.3-cp39-cp39-macosx_10_9_x86_64.whl (8.5 MB)
Collecting lifelines<2.0,>=0.20.0
  Using cached lifelines-0.25.6-py3-none-any.whl (347 kB)
Collecting PyYAML<6.0,>=3.0
  Using cached PyYAML-5.3.1.tar.gz (269 kB)
Collecting numpy<2.0,>=1.12.0
  Using cached numpy-1.19.4-cp39-cp39-macosx_10_9_x86_64.whl (15.4 MB)
Collecting hdbscan<2.0,>=0.8.0
  Using cached hdbscan-0.8.26.tar.gz (4.7 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting scipy<1.2.2,>=0.19.0
  Using cached scipy-1.2.1.tar.gz (23.1 MB)
Collecting seriate<2.0,>=1.1.2
  Using cached seriate-1.1.2-py3-none-any.whl (8.5 kB)
Collecting pandas<1.0,>=0.20.0
  Using cached pandas-0.25.3.tar.gz (12.6 MB)
Collecting tqdm<5.0,>=4.3
  Using cached tqdm-4.53.0-py2.py3-none-any.whl (70 kB)
Collecting python-dateutil<3.0,>=2.6.0
  Using cached python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Requirement already satisfied: six>=1.9 in /usr/local/lib/python3.9/site-packages (from protobuf<4.0,>=3.5.0->labours) (1.15.0)
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3
  Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting cycler>=0.10
  Using cached cycler-0.10.0-py2.py3-none-any.whl (6.5 kB)
Collecting kiwisolver>=1.0.1
  Using cached kiwisolver-1.3.1-cp39-cp39-macosx_10_9_x86_64.whl (61 kB)
Collecting pillow>=6.2.0
  Using cached Pillow-8.0.1-cp39-cp39-macosx_10_10_x86_64.whl (2.2 MB)
Collecting autograd>=1.3
  Using cached autograd-1.3.tar.gz (38 kB)
Collecting autograd-gamma>=0.3
  Using cached autograd-gamma-0.5.0.tar.gz (4.0 kB)
Collecting patsy>=0.5.0
  Using cached patsy-0.5.1-py2.py3-none-any.whl (231 kB)
Collecting scikit-learn>=0.17
  Using cached scikit-learn-0.23.2.tar.gz (7.2 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting joblib
  Using cached joblib-0.17.0-py3-none-any.whl (301 kB)
Collecting cython>=0.27
  Using cached Cython-0.29.21-py2.py3-none-any.whl (974 kB)
ERROR: Could not find a version that satisfies the requirement ortools<8,>=6.7.4973 (from seriate<2.0,>=1.1.2->labours) (from versions: 8.0.8283)
ERROR: No matching distribution found for ortools<8,>=6.7.4973 (from seriate<2.0,>=1.1.2->labours)

scottleedavis avatar Nov 24 '20 23:11 scottleedavis

I've the same problem on my Ubuntu 20.04 LTS

nschoenberg avatar Nov 28 '20 21:11 nschoenberg

Same problem

blazern avatar Jan 09 '21 11:01 blazern

Same problem, sudo apt-get install libatlas-base-dev gfortran did not solve it.

ankostis avatar Jan 14 '21 16:01 ankostis

On Ubuntu 20.04 installing the dependencies below works:

sudo apt-get install gfortran libopenblas-dev liblapack-dev

From https://github.com/scipy/scipy/issues/9005#issuecomment-623528512

ekans avatar Mar 04 '21 09:03 ekans

Since Pip version of numpy depends on OpenBLAS, we must install OpenBLAS to build NumPy from scratch. This can be skipped using a wheel of numpy package. Details here: https://numpy.org/install/

The NumPy wheels on PyPI, which is what pip installs, are built with OpenBLAS. The OpenBLAS libraries are included in the wheel.

So first run pip3 install wheel and then install labours. I can install labours by this method using Python 3.7.

nekketsuuu avatar May 02 '21 18:05 nekketsuuu

Hi, Just tried to install labours on linux and also fails, using python 3.10

neithanmo avatar Dec 05 '22 12:12 neithanmo