Как установить scs (cvxpy) локально?

Я пытаюсь установить scikit-survival, поэтому мне нужен cvxpy, которому также нужна зависимость scs.

Мне нужно установить его локально с помощью.whl или.tar.gz, я собираю пакеты с https://pypi.org/

Для scs я не могу установить scs-2.1.0.tar.gz или scs-2.1.2.tar.gz, моя ошибка:

    Processing ./scs-2.1.0.tar.gz
    Requirement already satisfied: numpy>=1.7 in /root/.local/lib/python3.6/site-packages (from scs==2.1.0)
Requirement already satisfied: scipy>=0.13.2 in /root/.local/lib/python3.6/site-packages (from scs==2.1.0)
Installing collected packages: scs
  Running setup.py install for scs ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-snoas4vb-build/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-wywh3k7p-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
    Namespace(blas64=False, extraverbose=False, float32=False, gpu=False, int32=False, scs=False)
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/scs
    copying src/__init__.py -> build/lib.linux-x86_64-3.6/scs
    running build_ext
    blas_mkl_info:
      NOT AVAILABLE
    blis_info:
      NOT AVAILABLE
    openblas_info:
        libraries = ['openblas', 'openblas']
        library_dirs = ['/usr/local/lib']
        language = c
        define_macros = [('HAVE_CBLAS', None)]
    blas_opt_info:
        libraries = ['openblas', 'openblas']
        library_dirs = ['/usr/local/lib']
        language = c
        define_macros = [('HAVE_CBLAS', None)]
    lapack_mkl_info:
      NOT AVAILABLE
    openblas_lapack_info:
        libraries = ['openblas', 'openblas']
        library_dirs = ['/usr/local/lib']
        language = c
        define_macros = [('HAVE_CBLAS', None)]
    lapack_opt_info:
        libraries = ['openblas', 'openblas']
        library_dirs = ['/usr/local/lib']
        language = c
        define_macros = [('HAVE_CBLAS', None)]
    /root/.local/lib/python3.6/site-packages/numpy/distutils/system_info.py:1914: UserWarning:
        Optimized (vendor) Blas libraries are not found.
        Falls back to netlib Blas library which has worse performance.
        A better performance should be easily gained by switching
        Blas library.
      if self._calc_info(blas):
    /root/.local/lib/python3.6/site-packages/numpy/distutils/system_info.py:1914: UserWarning:
        Blas (http://www.netlib.org/blas/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [blas]) or by setting
        the BLAS environment variable.
      if self._calc_info(blas):
    /root/.local/lib/python3.6/site-packages/numpy/distutils/system_info.py:1914: UserWarning:
        Blas (http://www.netlib.org/blas/) sources not found.
        Directories to search for the sources can be specified in the
        numpy/distutils/site.cfg file (section [blas_src]) or by setting
        the BLAS_SRC environment variable.
      if self._calc_info(blas):
    {}
    /root/.local/lib/python3.6/site-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))()
    /root/.local/lib/python3.6/site-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))()
    {}
    error: Command "gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPYTHON -DCTRLC=1 -DCOPYAMATRIX -DDLONG=1 -Iscs/include -Iscs/linsys -Iscs/linsys/direct/ -Iscs/linsys/direct/external/ -I/root/.local/lib/python3.6/site-packages/numpy/core/include -I/usr/include/python3.6m -c scs/src/cones.c -o build/temp.linux-x86_64-3.6/scs/src/cones.o -O3" failed with exit status 127
    
    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-snoas4vb-build/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-wywh3k7p-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-snoas4vb-build/

Итак, я попытался установить scs-1.1.7.tar.gz и scs-1.2.7.tar.gz, я не получил ошибки, но это бесполезно, потому что, когда я пытаюсь установить cvxpy, он не может найти scs, а когда я делаю import scs он тоже не может его найти.

В ходе своего исследования я обнаружил, что это пакет C? Но у меня все равно не получилось.

Благодарю.

0 ответов

Другие вопросы по тегам