在安装CVXPY时遇到以下问题,我也下载了Visual Studio的最新版本,但似乎也无法正常工作。
> C:\Anaconda3\lib\site-packages\numpy\distutils\system_info.py:1730:
> 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: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio":
> https://visualstudio.microsoft.com/downloads/
> {}
> {}
> ----------------------------------------
> ERROR: Failed building wheel for scs
> Running setup.py clean for scs
> Failed to build cvxpy ecos scs
> ERROR: Could not build wheels for cvxpy which use PEP 517 and cannot be installed directly
答案 0 :(得分:1)
我遇到了同样的问题。我必须创建一个新环境并进行安装才能正常工作。转到Anaconda Prompt,然后执行:
conda create your_env_name
conda activate your_env_name
conda install -c conda-forge cvxpy
conda install spyder
我在工作中使用Spyder。我必须像在步骤4中那样在新环境中安装Spyder。找不到可以使用现有Spyder在两种环境下工作的解决方法。