title: Can't install python library properly
body: <p>I tried to install the python portfolio optimization library with the following command</p>
  <pre><code>!pip install pyportfolioopt
  </code></pre>
  <p><a href="https://pypi.org/project/pyportfolioopt/" rel="nofollow noreferrer">Link</a> to the library's documentation</p>
  <p>However I get the following error output when I try to execute the command both in Jupyter notebook and conda command prompt. Any help would be appreciated. I really cant seem to figure a way around it.</p>
  <pre><code>Collecting pyportfolioopt
    Using cached PyPortfolioOpt-1.4.1-py3-none-any.whl (56 kB)
  Requirement already satisfied: pandas&gt;=0.19 in c:\users\aden\anaconda3\lib\site-packages (from pyportfolioopt) (1.1.3)
  Requirement already satisfied: scipy&lt;2.0,&gt;=1.3 in c:\users\aden\anaconda3\lib\site-packages (from pyportfolioopt) (1.5.2)
  Requirement already satisfied: numpy&lt;2.0,&gt;=1.12 in c:\users\aden\anaconda3\lib\site-packages (from pyportfolioopt) (1.19.2)
  Collecting cvxpy&lt;2.0.0,&gt;=1.1.10
    Using cached cvxpy-1.1.12-cp38-cp38-win_amd64.whl (827 kB)
  Collecting scs&gt;=1.1.6
    Using cached scs-2.1.3.tar.gz (147 kB)
  Collecting osqp&gt;=0.4.1
    Using cached osqp-0.6.2.post0-cp38-cp38-win_amd64.whl (162 kB)
  Collecting ecos&gt;=2
    Using cached ecos-2.0.7.post1.tar.gz (126 kB)
  Requirement already satisfied: qdldl in c:\users\aden\anaconda3\lib\site-packages (from osqp&gt;=0.4.1-&gt;cvxpy&lt;2.0.0,&gt;=1.1.10-&gt;pyportfolioopt) (0.1.5.post0)
  Requirement already satisfied: pytz&gt;=2017.2 in c:\users\aden\anaconda3\lib\site-packages (from pandas&gt;=0.19-&gt;pyportfolioopt) (2020.1)
  Requirement already satisfied: python-dateutil&gt;=2.7.3 in c:\users\aden\anaconda3\lib\site-packages (from pandas&gt;=0.19-&gt;pyportfolioopt) (2.8.1)
  Requirement already satisfied: six&gt;=1.5 in c:\users\aden\anaconda3\lib\site-packages (from python-dateutil&gt;=2.7.3-&gt;pandas&gt;=0.19-&gt;pyportfolioopt) (1.15.0)
  Building wheels for collected packages: ecos, scs
    Building wheel for ecos (setup.py): started
    Building wheel for ecos (setup.py): finished with status 'error'
    Running setup.py clean for ecos
    Building wheel for scs (setup.py): started
    Building wheel for scs (setup.py): finished with status 'error'
    Running setup.py clean for scs
  Failed to build ecos scs
  Installing collected packages: scs, osqp, ecos, cvxpy, pyportfolioopt
      Running setup.py install for scs: started
      Running setup.py install for scs: finished with status 'error'
  Note: you may need to restart the kernel to use updated packages.
  WARNING: Value for scheme.headers does not match. Please report this to &lt;https://github.com/pypa/pip/issues/9617&gt;
  distutils: C:\Users\aden\anaconda3\Include\UNKNOWN
  sysconfig: C:\Users\aden\anaconda3\Include
  WARNING: Additional context:
  user = False
  home = None
  root = None
  prefix = None
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\aden\anaconda3\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '&quot;'&quot;'C:\\Users\\aden\\AppData\\Local\\Temp\\pip-install-z2ri1hp7\\ecos_3a18f791998743eb89798898651c5f90\\setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'C:\\Users\\aden\\AppData\\Local\\Temp\\pip-install-z2ri1hp7\\ecos_3a18f791998743eb89798898651c5f90\\setup.py'&quot;'&quot;';f = getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__) if os.path.exists(__file__) else io.StringIO('&quot;'&quot;'from setuptools import setup; setup()'&quot;'&quot;');code = f.read().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))' bdist_wheel -d 'C:\Users\aden\AppData\Local\Temp\pip-wheel-rvqsqp1j'
         cwd: C:\Users\aden\AppData\Local\Temp\pip-install-z2ri1hp7\ecos_3a18f791998743eb89798898651c5f90\
    Complete output (12 lines):
    running bdist_wheel
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.8
    creating build\lib.win-amd64-3.8\ecos
    copying src\ecos\ecos.py -&gt; build\lib.win-amd64-3.8\ecos
    copying src\ecos\version.py -&gt; build\lib.win-amd64-3.8\ecos
    copying src\ecos\__init__.py -&gt; build\lib.win-amd64-3.8\ecos
    running build_ext
    building '_ecos' extension
    error: Microsoft Visual C++ 14.0 or greater is required. Get it with &quot;Microsoft C++ Build Tools&quot;: https://visualstudio.microsoft.com/visual-cpp-build-tools/
    ----------------------------------------
    ERROR: Failed building wheel for ecos
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\aden\anaconda3\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '&quot;'&quot;'C:\\Users\\aden\\AppData\\Local\\Temp\\pip-install-z2ri1hp7\\scs_9eedcd8428e8499dbe61698521ace3ee\\setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'C:\\Users\\aden\\AppData\\Local\\Temp\\pip-install-z2ri1hp7\\scs_9eedcd8428e8499dbe61698521ace3ee\\setup.py'&quot;'&quot;';f = getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__) if os.path.exists(__file__) else io.StringIO('&quot;'&quot;'from setuptools import setup; setup()'&quot;'&quot;');code = f.read().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))' bdist_wheel -d 'C:\Users\aden\AppData\Local\Temp\pip-wheel-tqc1q05z'
         cwd: C:\Users\aden\AppData\Local\Temp\pip-install-z2ri1hp7\scs_9eedcd8428e8499dbe61698521ace3ee\
    Complete output (90 lines):
    Namespace(blas64=False, extraverbose=False, float32=False, gpu=False, gpu_atrans=True, int32=False, scs=False)
    running bdist_wheel
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.8
    creating build\lib.win-amd64-3.8\scs
    copying src\__init__.py -&gt; build\lib.win-amd64-3.8\scs
    running build_ext
    blas_mkl_info:
        libraries = ['mkl_rt']
        library_dirs = ['C:/Users/aden/anaconda3\\Library\\lib']
        define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
        include_dirs = ['C:/Users/aden/anaconda3\\Library\\include']
    blas_opt_info:
        libraries = ['mkl_rt']
        library_dirs = ['C:/Users/aden/anaconda3\\Library\\lib']
        define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
        include_dirs = ['C:/Users/aden/anaconda3\\Library\\include']
    lapack_mkl_info:
        libraries = ['mkl_rt']
        library_dirs = ['C:/Users/aden/anaconda3\\Library\\lib']
        define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
        include_dirs = ['C:/Users/aden/anaconda3\\Library\\include']
    lapack_opt_info:
        libraries = ['mkl_rt']
        library_dirs = ['C:/Users/aden/anaconda3\\Library\\lib']
        define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
        include_dirs = ['C:/Users/aden/anaconda3\\Library\\include']
    Could not locate executable g77
    Could not locate executable f77
    Could not locate executable ifort
    Could not locate executable ifl
    Could not locate executable f90
    Could not locate executable DF
    Could not locate executable efl
    Using built-in specs.
    COLLECT_GCC=C:\MinGW\bin\gfortran.exe
    COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/lto-wrapper.exe
    Target: mingw32
    Configured with: ../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --with-gmp=/mingw --with-mpfr=/mingw --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw --disable-win32-registry --target=mingw32 --with-arch=i586 --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --with-tune=generic --enable-libgomp --disable-libvtv --enable-nls
    Thread model: win32
    gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)
    C:\Users\aden\anaconda3\lib\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):
    C:\Users\aden\anaconda3\lib\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):
    C:\Users\aden\anaconda3\lib\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):
    Using built-in specs.
    COLLECT_GCC=C:\MinGW\bin\gfortran.exe
    COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/lto-wrapper.exe
    Target: mingw32
    Configured with: ../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --with-gmp=/mingw --with-mpfr=/mingw --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw --disable-win32-registry --target=mingw32 --with-arch=i586 --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --with-tune=generic --enable-libgomp --disable-libvtv --enable-nls
    Thread model: win32
    gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)
    Using built-in specs.
    COLLECT_GCC=C:\MinGW\bin\gfortran.exe
    COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/lto-wrapper.exe
    Target: mingw32
    Configured with: ../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --with-gmp=/mingw --with-mpfr=/mingw --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw --disable-win32-registry --target=mingw32 --with-arch=i586 --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --with-tune=generic --enable-libgomp --disable-libvtv --enable-nls
    Thread model: win32
    gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)
    C:\Users\aden\anaconda3\lib\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))()
    C:\Users\aden\anaconda3\lib\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: Microsoft Visual C++ 14.0 or greater is required. Get it with &quot;Microsoft C++ Build Tools&quot;: https://visualstudio.microsoft.com/visual-cpp-build-tools/
    {}
    {}
    ----------------------------------------
    ERROR: Failed building wheel for scs
      ERROR: Command errored out with exit status 1:
       command: 'C:\Users\aden\anaconda3\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '&quot;'&quot;'C:\\Users\\aden\\AppData\\Local\\Temp\\pip-install-z2ri1hp7\\scs_9eedcd8428e8499dbe61698521ace3ee\\setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'C:\\Users\\aden\\AppData\\Local\\Temp\\pip-install-z2ri1hp7\\scs_9eedcd8428e8499dbe61698521ace3ee\\setup.py'&quot;'&quot;';f = getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__) if os.path.exists(__file__) else io.StringIO('&quot;'&quot;'from setuptools import setup; setup()'&quot;'&quot;');code = f.read().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))' install --record 'C:\Users\aden\AppData\Local\Temp\pip-record-399muuf3\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\aden\anaconda3\Include\scs'
           cwd: C:\Users\aden\AppData\Local\Temp\pip-install-z2ri1hp7\scs_9eedcd8428e8499dbe61698521ace3ee\
      Complete output (90 lines):
      Namespace(blas64=False, extraverbose=False, float32=False, gpu=False, gpu_atrans=True, int32=False, scs=False)
      running install
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-3.8
      creating build\lib.win-amd64-3.8\scs
      copying src\__init__.py -&gt; build\lib.win-amd64-3.8\scs
      running build_ext
      blas_mkl_info:
          libraries = ['mkl_rt']
          library_dirs = ['C:/Users/aden/anaconda3\\Library\\lib']
          define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
          include_dirs = ['C:/Users/aden/anaconda3\\Library\\include']
      blas_opt_info:
          libraries = ['mkl_rt']
          library_dirs = ['C:/Users/aden/anaconda3\\Library\\lib']
          define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
          include_dirs = ['C:/Users/aden/anaconda3\\Library\\include']
      lapack_mkl_info:
          libraries = ['mkl_rt']
          library_dirs = ['C:/Users/aden/anaconda3\\Library\\lib']
          define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
          include_dirs = ['C:/Users/aden/anaconda3\\Library\\include']
      lapack_opt_info:
          libraries = ['mkl_rt']
          library_dirs = ['C:/Users/aden/anaconda3\\Library\\lib']
          define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
          include_dirs = ['C:/Users/aden/anaconda3\\Library\\include']
      Could not locate executable g77
      Could not locate executable f77
      Could not locate executable ifort
      Could not locate executable ifl
      Could not locate executable f90
      Could not locate executable DF
      Could not locate executable efl
      Using built-in specs.
      COLLECT_GCC=C:\MinGW\bin\gfortran.exe
      COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/lto-wrapper.exe
      Target: mingw32
      Configured with: ../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --with-gmp=/mingw --with-mpfr=/mingw --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw --disable-win32-registry --target=mingw32 --with-arch=i586 --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --with-tune=generic --enable-libgomp --disable-libvtv --enable-nls
      Thread model: win32
      gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)
      C:\Users\aden\anaconda3\lib\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):
      C:\Users\aden\anaconda3\lib\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):
      C:\Users\aden\anaconda3\lib\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):
      Using built-in specs.
      COLLECT_GCC=C:\MinGW\bin\gfortran.exe
      COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/lto-wrapper.exe
      Target: mingw32
      Configured with: ../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --with-gmp=/mingw --with-mpfr=/mingw --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw --disable-win32-registry --target=mingw32 --with-arch=i586 --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --with-tune=generic --enable-libgomp --disable-libvtv --enable-nls
      Thread model: win32
      gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)
      Using built-in specs.
      COLLECT_GCC=C:\MinGW\bin\gfortran.exe
      COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/lto-wrapper.exe
      Target: mingw32
      Configured with: ../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --with-gmp=/mingw --with-mpfr=/mingw --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw --disable-win32-registry --target=mingw32 --with-arch=i586 --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --with-tune=generic --enable-libgomp --disable-libvtv --enable-nls
      Thread model: win32
      gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)
      C:\Users\aden\anaconda3\lib\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))()
      C:\Users\aden\anaconda3\lib\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: Microsoft Visual C++ 14.0 or greater is required. Get it with &quot;Microsoft C++ Build Tools&quot;: https://visualstudio.microsoft.com/visual-cpp-build-tools/
      {}
      {}
      ----------------------------------------
  ERROR: Command errored out with exit status 1: 'C:\Users\aden\anaconda3\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '&quot;'&quot;'C:\\Users\\aden\\AppData\\Local\\Temp\\pip-install-z2ri1hp7\\scs_9eedcd8428e8499dbe61698521ace3ee\\setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'C:\\Users\\aden\\AppData\\Local\\Temp\\pip-install-z2ri1hp7\\scs_9eedcd8428e8499dbe61698521ace3ee\\setup.py'&quot;'&quot;';f = getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__) if os.path.exists(__file__) else io.StringIO('&quot;'&quot;'from setuptools import setup; setup()'&quot;'&quot;');code = f.read().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))' install --record 'C:\Users\aden\AppData\Local\Temp\pip-record-399muuf3\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\aden\anaconda3\Include\scs' Check the logs for full command output.
  </code></pre>