Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip3 install labours fails on Linux #365

Open
jesuswasrasta opened this issue Sep 21, 2020 · 11 comments
Open

pip3 install labours fails on Linux #365

jesuswasrasta opened this issue Sep 21, 2020 · 11 comments

Comments

@jesuswasrasta
Copy link

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

@DanielRivasMD
Copy link

Same thing on Mac

@scottleedavis
Copy link

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)

@nschoenberg
Copy link

I've the same problem on my Ubuntu 20.04 LTS

@blazern
Copy link

blazern commented Jan 9, 2021

Same problem

@ankostis
Copy link

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

@ekans
Copy link

ekans commented Mar 4, 2021

On Ubuntu 20.04 installing the dependencies below works:

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

From scipy/scipy#9005 (comment)

@nekketsuuu
Copy link

nekketsuuu commented May 2, 2021

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.

@neithanmo
Copy link

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

@fivetran-thanhnguyen
Copy link

Need to change PyYAML dep version to >6

Collecting PyYAML<6.0,>=3.0 (from labours)
Downloading PyYAML-5.4.1.tar.gz (175 kB)

@BeastyBlacksmith
Copy link

I got it working using conda as package manager

@KaelWD
Copy link

KaelWD commented Sep 2, 2024

I installed gfortran libopenblas-dev liblapack-dev libatlas-base-dev and tried the workaround in yaml/pyyaml#736 but now pandas and scipy fail to build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests