cvxpy / cvxpy

A Python-embedded modeling language for convex optimization problems.
https://www.cvxpy.org
Apache License 2.0
5.37k stars 1.05k forks source link

Installation in Windows on Python 2.7, nosetests fails #626

Closed lliill closed 5 years ago

lliill commented 5 years ago

I followed the steps in cvxpy.org: I use Anaconda to install cvxpy.

When I run conda list, I get cvxcanon 0.1.0 py27_0 cvxgrp cvxpy 1.0.1 py27hf9d7886_0 cvxgrp

But I get a message error of nosetests like this

(py2) C:\Users\limen>nosetests cvxpy E

ERROR: Failure: ModuleNotFoundError (No module named 'cvxpy')

Traceback (most recent call last): File "C:\Users\limen\Anaconda3\lib\site-packages\nose\failure.py", line 39, in runTest raise self.exc_val.with_traceback(self.tb) File "C:\Users\limen\Anaconda3\lib\site-packages\nose\loader.py", line 406, in loadTestsFromName module = resolve_name(addr.module) File "C:\Users\limen\Anaconda3\lib\site-packages\nose\util.py", line 312, in resolve_name module = import('.'.join(parts_copy)) ModuleNotFoundError: No module named 'cvxpy'


Ran 1 test in 0.000s

FAILED (errors=1)

rileyjmurray commented 5 years ago

The cvxgrp conda channel is out of date for Windows distributions of cvxpy (it only has version 1.0.1, while we are on version 1.0.10). A source distribution of the latest version of cvxpy can always be found on pypi.

Using pip to install packages on a system managed by conda is a little subtle, because it is possible to have pip installed at a system level, and to have separate installations within specific virtual environments. Only the separate instances of pip (those contained within conda environments) are appropriate for people who primarily use conda. Luckily it is very, very easy to make sure you have a separate instance of pip for a given environment. If your conda environment is named myEnv, a Windows user need only run the following commands in the command line:

activate myEnv
conda install pip

From there, run the following:

activate myEnv
pip install cvxpy

(The first of the above lines is not really necessary, but it helps make the whole procedure fool-proof.)

Try the above and let us know if that fixes your problem.

lliill commented 5 years ago

I recreate an environment and use pip to install cvxpy But I still get a nosetests error:

(py2) C:\Users\limen>nosetests cvxpy
E
======================================================================
ERROR: Failure: ModuleNotFoundError (No module named 'cvxpy')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\limen\Anaconda3\lib\site-packages\nose\failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "C:\Users\limen\Anaconda3\lib\site-packages\nose\loader.py", line 406, in loadTestsFromName
    module = resolve_name(addr.module)
  File "C:\Users\limen\Anaconda3\lib\site-packages\nose\util.py", line 312, in resolve_name
    module = __import__('.'.join(parts_copy))
ModuleNotFoundError: No module named 'cvxpy'

----------------------------------------------------------------------
Ran 1 test in 0.016s

FAILED (errors=1)

Here is my conda list

(py2) C:\Users\limen>conda list
# packages in environment at C:\Users\limen\Anaconda3\envs\py2:
#
# Name                    Version                   Build  Channel
blas                      1.0                         mkl
certifi                   2018.10.15               py27_0
cvxpy                     1.0.10                    <pip>
dill                      0.2.8.2                   <pip>
ecos                      2.0.5                     <pip>
fastcache                 1.0.2                     <pip>
future                    0.17.1                    <pip>
icc_rt                    2017.0.4             h97af966_0
intel-openmp              2019.0                      118
mkl                       2019.0                      118
mkl_fft                   1.0.6            py27hac4a418_0
multiprocess              0.70.6.1                  <pip>
numpy                     1.15.4           py27hbe4291b_0
numpy-base                1.15.4           py27h2753ae9_0
osqp                      0.4.1                     <pip>
pip                       18.1                     py27_0
pyreadline                2.1                       <pip>
python                    2.7.15               h2880e7c_3
scipy                     1.1.0                     <pip>
scs                       2.0.2                     <pip>
setuptools                40.5.0                   py27_0
six                       1.11.0                    <pip>
toolz                     0.9.0                     <pip>
vc                        9                    h7299396_1
vs2008_runtime            9.00.30729.1         hfaea7d5_1
wheel                     0.32.2                   py27_0
wincertstore              0.2              py27hf04cefb_0
rileyjmurray commented 5 years ago

Hmmm. I’m sorry to ask, but could you try to repeat the procedure I gave in a conda environment managed by Anaconda2? There are known (separate) issues with the particular combination of cvxpy + Anaconda3 + Windows.

Sent with GitHawk

lliill commented 5 years ago

No. It is the same in Anaconda2


(base) C:\Users\limen>nosetests cvxpy
E
======================================================================
ERROR: Failure: ImportError (No module named cvxpy)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\limen\Anaconda2\lib\site-packages\nose\loader.py", line 407, in loadTestsFromName
    module = resolve_name(addr.module)
  File "C:\Users\limen\Anaconda2\lib\site-packages\nose\util.py", line 312, in resolve_name
    module = __import__('.'.join(parts_copy))
ImportError: No module named cvxpy

----------------------------------------------------------------------
Ran 1 test in 0.000s

FAILED (errors=1)
rileyjmurray commented 5 years ago

Okay. At this point I'm not sure what's happening. I can think of three ways to move forward while waiting on #627. The first method shouldn't be too painful, but it's also not comprehensive (if your development environment isn't properly configured it may not work). The second method is comprehensive, but time-consuming (and possibly a pain if you have no experience with linux). The third method requires fairly deep knowledge of Windows powershell and command line environments.

  1. You could install an up-to-date cvxpy Windows binary currently hosted on https://www.lfd.uci.edu/~gohlke/pythonlibs/.

  2. You could try doing your python development within a Windows Linux Subsystem (https://docs.microsoft.com/en-us/windows/wsl/install-win10).

  3. Refer to our automatic Windows builds that we use for testing. You can find output of the most recent Python 2.7 cvxpy test build at https://ci.appveyor.com/project/StevenDiamond/cvxpy/build/job/tvrmjglq55e4jqrb. If you want to reproduce those installation steps on your machine, you should follow the commands in https://github.com/cvxgrp/cvxpy/blob/master/continuous_integration/appveyor_install.ps1. Those commands must be executed in a powershell terminal (i.e. not the normal command line), and you would need to substitute the appropriate environment variables. You would test your installation of cvxpy by following the last few lines here: https://github.com/cvxgrp/cvxpy/blob/44ae7b54532879f5fbad068698991911dc8deb69/appveyor.yml#L32-L37 ^ You would drop the quotation marks around those commands when plugging them into the command line, and you would replace %ENV_NAME% with the name of your conda environment (e.g. py27).

lliill commented 5 years ago

I installed cvxpy via pip on python3 in my debian linux-subsystem, and nosetests failed

/home/lmd/.local/lib/python3.5/site-packages/cvxpy/expressions/expression.py:385: UserWarning: Forming a nonconvex expression.
  warnings.warn("Forming a nonconvex expression.")
.............................................................................E..................................E.......................................E.....EE..E...........................................
======================================================================
ERROR: Test eigenvalue atoms.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/tests/test_complex.py", line 299, in test_eigval_atoms
    result = prob.solve(solver=cvx.SCS, eps=1e-5)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 247, in solve
    return solve_func(self, *args, **kwargs)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 362, in _solve
    self.unpack_results(solution, self._solving_chain, inverse_data)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 472, in unpack_results
    "to reduce the dynamic range."
cvxpy.error.SolverError: Solver 'SCS' failed. Try another solver or solve with verbose=True for more information. Try recentering the problem data around 0 and rescaling to reduce the dynamic range.
-------------------- >> begin captured stdout << ---------------------
FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries
Install blas+lapack and re-compile SCS with blas+lapack libray locations
ERROR: init_cone failure
Failure:could not initialize work

--------------------- >> end captured stdout << ----------------------

======================================================================
ERROR: Test log det.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/tests/test_complex.py", line 285, in test_log_det
    result = prob.solve(solver=cvx.SCS, eps=1e-6)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 247, in solve
    return solve_func(self, *args, **kwargs)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 362, in _solve
    self.unpack_results(solution, self._solving_chain, inverse_data)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 472, in unpack_results
    "to reduce the dynamic range."
cvxpy.error.SolverError: Solver 'SCS' failed. Try another solver or solve with verbose=True for more information. Try recentering the problem data around 0 and rescaling to reduce the dynamic range.
-------------------- >> begin captured stdout << ---------------------
FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries
Install blas+lapack and re-compile SCS with blas+lapack libray locations
ERROR: init_cone failure
Failure:could not initialize work

--------------------- >> end captured stdout << ----------------------

======================================================================
ERROR: Test matrix_frac atom.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/tests/test_complex.py", line 360, in test_matrix_frac
    result = prob.solve(solver=cvx.SCS, eps=1e-6, max_iters=7500, verbose=True)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 247, in solve
    return solve_func(self, *args, **kwargs)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 362, in _solve
    self.unpack_results(solution, self._solving_chain, inverse_data)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 472, in unpack_results
    "to reduce the dynamic range."
cvxpy.error.SolverError: Solver 'SCS' failed. Try another solver or solve with verbose=True for more information. Try recentering the problem data around 0 and rescaling to reduce the dynamic range.
-------------------- >> begin captured stdout << ---------------------
----------------------------------------------------------------------------
        SCS v2.0.2 - Splitting Conic Solver
        (c) Brendan O'Donoghue, Stanford University, 2012-2017
----------------------------------------------------------------------------
Lin-sys: sparse-indirect, nnz in A = 65, CG tol ~ 1/iter^(2.00)
eps = 1.00e-06, alpha = 1.50, max_iters = 7500, normalize = 1, scale = 1.00
acceleration_lookback = -1, rho_x = 1.00e-03
Variables n = 26, constraints m = 46
Cones:  primal zero / dual free vars: 31
        sd vars: 15, sd blks: 1
FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries
Install blas+lapack and re-compile SCS with blas+lapack libray locations
ERROR: init_cone failure
Setup time: 7.90e-05s
Failure:could not initialize work

--------------------- >> end captured stdout << ----------------------

======================================================================
ERROR: Test matrix norms.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/tests/test_complex.py", line 267, in test_matrix_norms
    result = prob.solve()
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 247, in solve
    return solve_func(self, *args, **kwargs)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 362, in _solve
    self.unpack_results(solution, self._solving_chain, inverse_data)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 472, in unpack_results
    "to reduce the dynamic range."
cvxpy.error.SolverError: Solver 'SCS' failed. Try another solver or solve with verbose=True for more information. Try recentering the problem data around 0 and rescaling to reduce the dynamic range.
-------------------- >> begin captured stdout << ---------------------
FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries
Install blas+lapack and re-compile SCS with blas+lapack libray locations
ERROR: init_cone failure
Failure:could not initialize work

--------------------- >> end captured stdout << ----------------------

======================================================================
ERROR: Test Hermitian variables.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/tests/test_complex.py", line 394, in test_psd
    prob.solve()
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 247, in solve
    return solve_func(self, *args, **kwargs)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 362, in _solve
    self.unpack_results(solution, self._solving_chain, inverse_data)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 472, in unpack_results
    "to reduce the dynamic range."
cvxpy.error.SolverError: Solver 'SCS' failed. Try another solver or solve with verbose=True for more information. Try recentering the problem data around 0 and rescaling to reduce the dynamic range.
-------------------- >> begin captured stdout << ---------------------
FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries
Install blas+lapack and re-compile SCS with blas+lapack libray locations
ERROR: init_cone failure
Failure:could not initialize work

--------------------- >> end captured stdout << ----------------------

======================================================================
ERROR: test_log_det (cvxpy.tests.test_examples.TestExamples)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/tests/test_examples.py", line 345, in test_log_det
    result = p.solve()
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 247, in solve
    return solve_func(self, *args, **kwargs)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 362, in _solve
    self.unpack_results(solution, self._solving_chain, inverse_data)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 472, in unpack_results
    "to reduce the dynamic range."
cvxpy.error.SolverError: Solver 'SCS' failed. Try another solver or solve with verbose=True for more information. Try recentering the problem data around 0 and rescaling to reduce the dynamic range.
-------------------- >> begin captured stdout << ---------------------
FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries
Install blas+lapack and re-compile SCS with blas+lapack libray locations
ERROR: init_cone failure
Failure:could not initialize work

--------------------- >> end captured stdout << ----------------------

======================================================================
ERROR: Test a problem with diag.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/tests/test_problem.py", line 1404, in test_diag_prob
    result = prob.solve()
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 247, in solve
    return solve_func(self, *args, **kwargs)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 362, in _solve
    self.unpack_results(solution, self._solving_chain, inverse_data)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 472, in unpack_results
    "to reduce the dynamic range."
cvxpy.error.SolverError: Solver 'SCS' failed. Try another solver or solve with verbose=True for more information. Try recentering the problem data around 0 and rescaling to reduce the dynamic range.
-------------------- >> begin captured stdout << ---------------------
FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries
Install blas+lapack and re-compile SCS with blas+lapack libray locations
ERROR: init_cone failure
Failure:could not initialize work

--------------------- >> end captured stdout << ----------------------

======================================================================
ERROR: Test positive definite constraints.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/tests/test_problem.py", line 1464, in test_psd_constraints
    result = prob.solve()
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 247, in solve
    return solve_func(self, *args, **kwargs)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 362, in _solve
    self.unpack_results(solution, self._solving_chain, inverse_data)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 472, in unpack_results
    "to reduce the dynamic range."
cvxpy.error.SolverError: Solver 'SCS' failed. Try another solver or solve with verbose=True for more information. Try recentering the problem data around 0 and rescaling to reduce the dynamic range.
-------------------- >> begin captured stdout << ---------------------
FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries
Install blas+lapack and re-compile SCS with blas+lapack libray locations
ERROR: init_cone failure
Failure:could not initialize work

--------------------- >> end captured stdout << ----------------------

======================================================================
ERROR: Test complex matrices.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/tests/test_scs.py", line 109, in test_cplx_mats
    sol_scs = problem.solve(solver='SCS')
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 247, in solve
    return solve_func(self, *args, **kwargs)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 362, in _solve
    self.unpack_results(solution, self._solving_chain, inverse_data)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 472, in unpack_results
    "to reduce the dynamic range."
cvxpy.error.SolverError: Solver 'SCS' failed. Try another solver or solve with verbose=True for more information. Try recentering the problem data around 0 and rescaling to reduce the dynamic range.
-------------------- >> begin captured stdout << ---------------------
WARN: A->p (column pointers) not strictly increasing, column 2 empty
WARN: A->p (column pointers) not strictly increasing, column 6 empty
FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries
Install blas+lapack and re-compile SCS with blas+lapack libray locations
ERROR: init_cone failure
Failure:could not initialize work

--------------------- >> end captured stdout << ----------------------

======================================================================
ERROR: Test sdp var.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/tests/test_scs.py", line 84, in test_sdp_var
    prob.solve(verbose=True, solver=cvx.SCS)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 247, in solve
    return solve_func(self, *args, **kwargs)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 362, in _solve
    self.unpack_results(solution, self._solving_chain, inverse_data)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 472, in unpack_results
    "to reduce the dynamic range."
cvxpy.error.SolverError: Solver 'SCS' failed. Try another solver or solve with verbose=True for more information. Try recentering the problem data around 0 and rescaling to reduce the dynamic range.
-------------------- >> begin captured stdout << ---------------------
----------------------------------------------------------------------------
        SCS v2.0.2 - Splitting Conic Solver
        (c) Brendan O'Donoghue, Stanford University, 2012-2017
----------------------------------------------------------------------------
Lin-sys: sparse-indirect, nnz in A = 15, CG tol ~ 1/iter^(2.00)
eps = 1.00e-05, alpha = 1.50, max_iters = 5000, normalize = 1, scale = 1.00
acceleration_lookback = -1, rho_x = 1.00e-03
Variables n = 6, constraints m = 15
Cones:  primal zero / dual free vars: 9
        sd vars: 6, sd blks: 1
FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries
Install blas+lapack and re-compile SCS with blas+lapack libray locations
ERROR: init_cone failure
Setup time: 6.40e-05s
Failure:could not initialize work

--------------------- >> end captured stdout << ----------------------

======================================================================
ERROR: Test sigma_max.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/tests/test_scs.py", line 74, in test_sigma_max
    result = prob.solve(solver=cvx.SCS)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 247, in solve
    return solve_func(self, *args, **kwargs)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 362, in _solve
    self.unpack_results(solution, self._solving_chain, inverse_data)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 472, in unpack_results
    "to reduce the dynamic range."
cvxpy.error.SolverError: Solver 'SCS' failed. Try another solver or solve with verbose=True for more information. Try recentering the problem data around 0 and rescaling to reduce the dynamic range.
-------------------- >> begin captured stdout << ---------------------
FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries
Install blas+lapack and re-compile SCS with blas+lapack libray locations
ERROR: init_cone failure
Failure:could not initialize work

--------------------- >> end captured stdout << ----------------------

======================================================================
ERROR: Test that results are symmetric.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/tests/test_semidefinite_vars.py", line 44, in test_symm
    opt_val = prob.solve()
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 247, in solve
    return solve_func(self, *args, **kwargs)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 362, in _solve
    self.unpack_results(solution, self._solving_chain, inverse_data)
  File "/home/lmd/.local/lib/python3.5/site-packages/cvxpy/problems/problem.py", line 472, in unpack_results
    "to reduce the dynamic range."
cvxpy.error.SolverError: Solver 'SCS' failed. Try another solver or solve with verbose=True for more information. Try recentering the problem data around 0 and rescaling to reduce the dynamic range.
-------------------- >> begin captured stdout << ---------------------
FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries
Install blas+lapack and re-compile SCS with blas+lapack libray locations
ERROR: init_cone failure
Failure:could not initialize work

--------------------- >> end captured stdout << ----------------------

----------------------------------------------------------------------
Ran 1836 tests in 14.127s

FAILED (errors=12)

And the version is 1.0.10

lmd@DESKTOP-SIK3N3F:~$ python3 -m pip show cvxpy
Name: cvxpy
Version: 1.0.10
Summary: A domain-specific language for modeling convex optimization problems in Python.
Home-page: http://github.com/cvxgrp/cvxpy/
Author: Steven Diamond, Eric Chu, Stephen Boyd
Author-email: stevend2@stanford.edu, echu508@stanford.edu, boyd@stanford.edu
License: Apache License, Version 2.0
Location: /home/lmd/.local/lib/python3.5/site-packages
Requires: fastcache, ecos, multiprocess, six, toolz, scipy, osqp, numpy, scs
lliill commented 5 years ago

In python 2 of linux-subsystem, it is the same:

lmd@DESKTOP-SIK3N3F:~$ python -m nose cvxpy
....................................................E..EEE....E..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E.................................................................................................................E..................................E.......................................E.....EE..E...........................................
======================================================================
ERROR: Test eigenvalue atoms.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/tests/test_complex.py", line 299, in test_eigval_atoms
    result = prob.solve(solver=cvx.SCS, eps=1e-5)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 247, in solve
    return solve_func(self, *args, **kwargs)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 362, in _solve
    self.unpack_results(solution, self._solving_chain, inverse_data)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 472, in unpack_results
    "to reduce the dynamic range."
SolverError: Solver 'SCS' failed. Try another solver or solve with verbose=True for more information. Try recentering the problem data around 0 and rescaling to reduce the dynamic range.
-------------------- >> begin captured stdout << ---------------------
FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries
Install blas+lapack and re-compile SCS with blas+lapack libray locations
ERROR: init_cone failure
Failure:could not initialize work

--------------------- >> end captured stdout << ----------------------

======================================================================
ERROR: Test log det.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/tests/test_complex.py", line 285, in test_log_det
    result = prob.solve(solver=cvx.SCS, eps=1e-6)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 247, in solve
    return solve_func(self, *args, **kwargs)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 362, in _solve
    self.unpack_results(solution, self._solving_chain, inverse_data)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 472, in unpack_results
    "to reduce the dynamic range."
SolverError: Solver 'SCS' failed. Try another solver or solve with verbose=True for more information. Try recentering the problem data around 0 and rescaling to reduce the dynamic range.
-------------------- >> begin captured stdout << ---------------------
FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries
Install blas+lapack and re-compile SCS with blas+lapack libray locations
ERROR: init_cone failure
Failure:could not initialize work

--------------------- >> end captured stdout << ----------------------

======================================================================
ERROR: Test matrix_frac atom.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/tests/test_complex.py", line 360, in test_matrix_frac
    result = prob.solve(solver=cvx.SCS, eps=1e-6, max_iters=7500, verbose=True)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 247, in solve
    return solve_func(self, *args, **kwargs)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 362, in _solve
    self.unpack_results(solution, self._solving_chain, inverse_data)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 472, in unpack_results
    "to reduce the dynamic range."
SolverError: Solver 'SCS' failed. Try another solver or solve with verbose=True for more information. Try recentering the problem data around 0 and rescaling to reduce the dynamic range.
-------------------- >> begin captured stdout << ---------------------
----------------------------------------------------------------------------
        SCS v2.0.2 - Splitting Conic Solver
        (c) Brendan O'Donoghue, Stanford University, 2012-2017
----------------------------------------------------------------------------
Lin-sys: sparse-indirect, nnz in A = 65, CG tol ~ 1/iter^(2.00)
eps = 1.00e-06, alpha = 1.50, max_iters = 7500, normalize = 1, scale = 1.00
acceleration_lookback = -1, rho_x = 1.00e-03
Variables n = 26, constraints m = 46
Cones:  primal zero / dual free vars: 31
        sd vars: 15, sd blks: 1
FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries
Install blas+lapack and re-compile SCS with blas+lapack libray locations
ERROR: init_cone failure
Setup time: 1.52e-04s
Failure:could not initialize work

--------------------- >> end captured stdout << ----------------------

======================================================================
ERROR: Test matrix norms.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/tests/test_complex.py", line 267, in test_matrix_norms
    result = prob.solve()
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 247, in solve
    return solve_func(self, *args, **kwargs)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 362, in _solve
    self.unpack_results(solution, self._solving_chain, inverse_data)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 472, in unpack_results
    "to reduce the dynamic range."
SolverError: Solver 'SCS' failed. Try another solver or solve with verbose=True for more information. Try recentering the problem data around 0 and rescaling to reduce the dynamic range.
-------------------- >> begin captured stdout << ---------------------
FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries
Install blas+lapack and re-compile SCS with blas+lapack libray locations
ERROR: init_cone failure
Failure:could not initialize work

--------------------- >> end captured stdout << ----------------------

======================================================================
ERROR: Test Hermitian variables.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/tests/test_complex.py", line 394, in test_psd
    prob.solve()
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 247, in solve
    return solve_func(self, *args, **kwargs)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 362, in _solve
    self.unpack_results(solution, self._solving_chain, inverse_data)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 472, in unpack_results
    "to reduce the dynamic range."
SolverError: Solver 'SCS' failed. Try another solver or solve with verbose=True for more information. Try recentering the problem data around 0 and rescaling to reduce the dynamic range.
-------------------- >> begin captured stdout << ---------------------
FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries
Install blas+lapack and re-compile SCS with blas+lapack libray locations
ERROR: init_cone failure
Failure:could not initialize work

--------------------- >> end captured stdout << ----------------------

======================================================================
ERROR: test_log_det (cvxpy.tests.test_examples.TestExamples)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/tests/test_examples.py", line 345, in test_log_det
    result = p.solve()
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 247, in solve
    return solve_func(self, *args, **kwargs)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 362, in _solve
    self.unpack_results(solution, self._solving_chain, inverse_data)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 472, in unpack_results
    "to reduce the dynamic range."
SolverError: Solver 'SCS' failed. Try another solver or solve with verbose=True for more information. Try recentering the problem data around 0 and rescaling to reduce the dynamic range.
-------------------- >> begin captured stdout << ---------------------
FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries
Install blas+lapack and re-compile SCS with blas+lapack libray locations
ERROR: init_cone failure
Failure:could not initialize work

--------------------- >> end captured stdout << ----------------------

======================================================================
ERROR: Test a problem with diag.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/tests/test_problem.py", line 1404, in test_diag_prob
    result = prob.solve()
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 247, in solve
    return solve_func(self, *args, **kwargs)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 362, in _solve
    self.unpack_results(solution, self._solving_chain, inverse_data)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 472, in unpack_results
    "to reduce the dynamic range."
SolverError: Solver 'SCS' failed. Try another solver or solve with verbose=True for more information. Try recentering the problem data around 0 and rescaling to reduce the dynamic range.
-------------------- >> begin captured stdout << ---------------------
FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries
Install blas+lapack and re-compile SCS with blas+lapack libray locations
ERROR: init_cone failure
Failure:could not initialize work

--------------------- >> end captured stdout << ----------------------

======================================================================
ERROR: Test positive definite constraints.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/tests/test_problem.py", line 1464, in test_psd_constraints
    result = prob.solve()
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 247, in solve
    return solve_func(self, *args, **kwargs)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 362, in _solve
    self.unpack_results(solution, self._solving_chain, inverse_data)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 472, in unpack_results
    "to reduce the dynamic range."
SolverError: Solver 'SCS' failed. Try another solver or solve with verbose=True for more information. Try recentering the problem data around 0 and rescaling to reduce the dynamic range.
-------------------- >> begin captured stdout << ---------------------
FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries
Install blas+lapack and re-compile SCS with blas+lapack libray locations
ERROR: init_cone failure
Failure:could not initialize work

--------------------- >> end captured stdout << ----------------------

======================================================================
ERROR: Test complex matrices.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/tests/test_scs.py", line 109, in test_cplx_mats
    sol_scs = problem.solve(solver='SCS')
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 247, in solve
    return solve_func(self, *args, **kwargs)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 362, in _solve
    self.unpack_results(solution, self._solving_chain, inverse_data)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 472, in unpack_results
    "to reduce the dynamic range."
SolverError: Solver 'SCS' failed. Try another solver or solve with verbose=True for more information. Try recentering the problem data around 0 and rescaling to reduce the dynamic range.
-------------------- >> begin captured stdout << ---------------------
WARN: A->p (column pointers) not strictly increasing, column 2 empty
WARN: A->p (column pointers) not strictly increasing, column 6 empty
FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries
Install blas+lapack and re-compile SCS with blas+lapack libray locations
ERROR: init_cone failure
Failure:could not initialize work

--------------------- >> end captured stdout << ----------------------

======================================================================
ERROR: Test sdp var.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/tests/test_scs.py", line 84, in test_sdp_var
    prob.solve(verbose=True, solver=cvx.SCS)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 247, in solve
    return solve_func(self, *args, **kwargs)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 362, in _solve
    self.unpack_results(solution, self._solving_chain, inverse_data)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 472, in unpack_results
    "to reduce the dynamic range."
SolverError: Solver 'SCS' failed. Try another solver or solve with verbose=True for more information. Try recentering the problem data around 0 and rescaling to reduce the dynamic range.
-------------------- >> begin captured stdout << ---------------------
----------------------------------------------------------------------------
        SCS v2.0.2 - Splitting Conic Solver
        (c) Brendan O'Donoghue, Stanford University, 2012-2017
----------------------------------------------------------------------------
Lin-sys: sparse-indirect, nnz in A = 15, CG tol ~ 1/iter^(2.00)
eps = 1.00e-05, alpha = 1.50, max_iters = 5000, normalize = 1, scale = 1.00
acceleration_lookback = -1, rho_x = 1.00e-03
Variables n = 6, constraints m = 15
Cones:  primal zero / dual free vars: 9
        sd vars: 6, sd blks: 1
FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries
Install blas+lapack and re-compile SCS with blas+lapack libray locations
ERROR: init_cone failure
Setup time: 1.90e-04s
Failure:could not initialize work

--------------------- >> end captured stdout << ----------------------

======================================================================
ERROR: Test sigma_max.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/tests/test_scs.py", line 74, in test_sigma_max
    result = prob.solve(solver=cvx.SCS)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 247, in solve
    return solve_func(self, *args, **kwargs)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 362, in _solve
    self.unpack_results(solution, self._solving_chain, inverse_data)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 472, in unpack_results
    "to reduce the dynamic range."
SolverError: Solver 'SCS' failed. Try another solver or solve with verbose=True for more information. Try recentering the problem data around 0 and rescaling to reduce the dynamic range.
-------------------- >> begin captured stdout << ---------------------
FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries
Install blas+lapack and re-compile SCS with blas+lapack libray locations
ERROR: init_cone failure
Failure:could not initialize work

--------------------- >> end captured stdout << ----------------------

======================================================================
ERROR: Test that results are symmetric.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/tests/test_semidefinite_vars.py", line 44, in test_symm
    opt_val = prob.solve()
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 247, in solve
    return solve_func(self, *args, **kwargs)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 362, in _solve
    self.unpack_results(solution, self._solving_chain, inverse_data)
  File "/home/lmd/.local/lib/python2.7/site-packages/cvxpy/problems/problem.py", line 472, in unpack_results
    "to reduce the dynamic range."
SolverError: Solver 'SCS' failed. Try another solver or solve with verbose=True for more information. Try recentering the problem data around 0 and rescaling to reduce the dynamic range.
-------------------- >> begin captured stdout << ---------------------
FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries
Install blas+lapack and re-compile SCS with blas+lapack libray locations
ERROR: init_cone failure
Failure:could not initialize work

--------------------- >> end captured stdout << ----------------------

----------------------------------------------------------------------
Ran 1836 tests in 13.308s
lliill commented 5 years ago

And these errors are the same when I install cvxpy 1.0.1 by Anaconda2 (not by pip), or in a python2 environment of Anaconda3

SteveDiamond commented 5 years ago

These errors are not such a big deal. They mean SCS wasn't installed properly, but you don't need SCS to use CVXPY. Don't worry about it.