title: Python pip install "ERROR: Command errored out with exit status 1"
body: <p>I'm trying to <code>pip install telewavesim</code> (following instructions <a href="https://paudetseis.github.io/Telewavesim/api.html#installation" rel="nofollow noreferrer">here</a>) and I am getting this error. I'm running this on windows 10.</p>
  
  <p>I searched for an answer and tried running as an admin which gets the same error. I also tried </p>
  
  <pre><code>pip install --upgrade setuptools
  pip install ez_setup
  </code></pre>
  
  <p>And still get the same error.</p>
  
  <p>Any ideas?</p>
  
  <pre><code> ERROR: Command errored out with exit status 1:
        command: 'C:\Users\ckh_000\anaconda3\envs\tws\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] =
   '"'"'C:\\Users\\CKH_~1\\AppData\\Local\\Temp\\pip-install-ax5p37i5\\telewavesim\\setup.py'"'"';
   __file__='"'"'C:\\Users\\CKH_~1\\AppData\\Local\\Temp\\pip-install-ax5p37i5\\telewavesim\\setup.py'"'"';f=getattr(tokenize,
   '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"',
   '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))'
   egg_info --egg-base
   'C:\Users\CKH_~1\AppData\Local\Temp\pip-pip-egg-info-zfutbqc4'
  
   cwd: C:\Users\CKH_~1\AppData\Local\Temp\pip-install-ax5p37i5\telewavesim\
  
   Complete output (11 lines):
  
   C:\Users\ckh_000\anaconda3\envs\tws\lib\site-packages\numpy\distutils\system_info.py:811:
   UserWarning: Specified path
   D:\bld\numpy_1584937762393\_h_env\Library\lib is invalid.
  return self.get_paths(self.section, key)
  
  Traceback (most recent call last):
  
  File "&lt;string&gt;", line 1, in &lt;module&gt;
  
  File "C:\Users\CKH_~1\AppData\Local\Temp\pip-install-ax5p37i5\telewavesim\setup.py",
   line 23, in &lt;module&gt;
  version=find_version('telewavesim', '__init__.py'),
  
  File "C:\Users\CKH_~1\AppData\Local\Temp\pip-install-ax5p37i5\telewavesim\setup.py",
   line 9, in find_version
  
  code = fp.read()
  
  File "C:\Users\ckh_000\anaconda3\envs\tws\lib\encodings\cp1252.py", line
   23, in decode
  return codecs.charmap_decode(input,self.errors,decoding_table)[0]
  
  UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 7522: character maps to &lt;undefined&gt;
  
  ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for
   full command output.
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>This is the result when I try to install from source.
  I saw errors about fortran compiler - I did install gfortran. The website says  "Add fortran-compiler package to the above conda environment calls" which I tried I think I am not doing that correctly. I was just adding fortran-compiler to the -c flag but that doesn't seem to be working.</p>
  
  <pre><code>Processing c:\users\ckh_000\documents\telewavesim
  Requirement already satisfied: numpy&gt;=1.15 in c:\users\ckh_000\anaconda3\lib\site-packages (from telewavesim==0.2.0) (1.18.1)
  Collecting obspy&gt;=1.0.0
    Downloading obspy-1.2.1-cp37-cp37m-win_amd64.whl (21.7 MB)
       |████████████████████████████████| 21.7 MB 40 kB/s
  Requirement already satisfied: matplotlib in c:\users\ckh_000\anaconda3\lib\site-packages (from telewavesim==0.2.0) (3.1.3)
  Requirement already satisfied: decorator in c:\users\ckh_000\anaconda3\lib\site-packages (from obspy&gt;=1.0.0-&gt;telewavesim==0.2.0) (4.4.1)
  Requirement already satisfied: setuptools in c:\users\ckh_000\anaconda3\lib\site-packages (from obspy&gt;=1.0.0-&gt;telewavesim==0.2.0) (46.1.3)
  Requirement already satisfied: future&gt;=0.12.4 in c:\users\ckh_000\anaconda3\lib\site-packages (from obspy&gt;=1.0.0-&gt;telewavesim==0.2.0) (0.18.2)
  Requirement already satisfied: scipy&gt;=0.9.0 in c:\users\ckh_000\anaconda3\lib\site-packages (from obspy&gt;=1.0.0-&gt;telewavesim==0.2.0) (1.4.1)
  Requirement already satisfied: lxml in c:\users\ckh_000\anaconda3\lib\site-packages (from obspy&gt;=1.0.0-&gt;telewavesim==0.2.0) (4.5.0)
  Requirement already satisfied: sqlalchemy in c:\users\ckh_000\anaconda3\lib\site-packages (from obspy&gt;=1.0.0-&gt;telewavesim==0.2.0) (1.3.13)
  Requirement already satisfied: requests in c:\users\ckh_000\anaconda3\lib\site-packages (from obspy&gt;=1.0.0-&gt;telewavesim==0.2.0) (2.22.0)
  Requirement already satisfied: kiwisolver&gt;=1.0.1 in c:\users\ckh_000\anaconda3\lib\site-packages (from matplotlib-&gt;telewavesim==0.2.0) (1.1.0)
  Requirement already satisfied: cycler&gt;=0.10 in c:\users\ckh_000\anaconda3\lib\site-packages (from matplotlib-&gt;telewavesim==0.2.0) (0.10.0)
  Requirement already satisfied: python-dateutil&gt;=2.1 in c:\users\ckh_000\anaconda3\lib\site-packages (from matplotlib-&gt;telewavesim==0.2.0) (2.8.1)
  Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,&gt;=2.0.1 in c:\users\ckh_000\anaconda3\lib\site-packages (from matplotlib-&gt;telewavesim==0.2.0) (2.4.6)
  Requirement already satisfied: certifi&gt;=2017.4.17 in c:\users\ckh_000\anaconda3\lib\site-packages (from requests-&gt;obspy&gt;=1.0.0-&gt;telewavesim==0.2.0) (2019.11.28)
  Requirement already satisfied: idna&lt;2.9,&gt;=2.5 in c:\users\ckh_000\anaconda3\lib\site-packages (from requests-&gt;obspy&gt;=1.0.0-&gt;telewavesim==0.2.0) (2.8)
  Requirement already satisfied: chardet&lt;3.1.0,&gt;=3.0.2 in c:\users\ckh_000\anaconda3\lib\site-packages (from requests-&gt;obspy&gt;=1.0.0-&gt;telewavesim==0.2.0) (3.0.4)
  Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,&lt;1.26,&gt;=1.21.1 in c:\users\ckh_000\anaconda3\lib\site-packages (from requests-&gt;obspy&gt;=1.0.0-&gt;telewavesim==0.2.0) (1.25.8)
  Requirement already satisfied: six in c:\users\ckh_000\anaconda3\lib\site-packages (from cycler&gt;=0.10-&gt;matplotlib-&gt;telewavesim==0.2.0) (1.14.0)
  Building wheels for collected packages: telewavesim
    Building wheel for telewavesim (setup.py) ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\ckh_000\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ckh_~1\\AppData\\Local\\Temp\\pip-req-build-_0kjatmr\\setup.py'"'"'; __file__='"'"'C:\\Users\\ckh_~1\\AppData\\Local\\Temp\\pip-req-build-_0kjatmr\\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 'C:\Users\ckh_~1\AppData\Local\Temp\pip-wheel-8qv0f5f7'
         cwd: C:\Users\ckh_~1\AppData\Local\Temp\pip-req-build-_0kjatmr\
    Complete output (55 lines):
    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
    Could not locate executable gfortran
    Could not locate executable f95
    Could not locate executable g95
    Could not locate executable efort
    Could not locate executable efc
    Could not locate executable flang
    don't know how to compile Fortran code on platform 'nt'
    C:\Users\ckh_000\anaconda3\lib\site-packages\numpy\distutils\system_info.py:1730: 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\ckh_000\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))()
    C:\Users\ckh_000\anaconda3\lib\site-packages\numpy\distutils\system_info.py:471: 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 cl().get_info(notfound_action)
    running bdist_wheel
    running build
    running config_cc
    unifing config_cc, config, build_clib, build_ext, build commands --compiler options
    running config_fc
    unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
    running build_src
    build_src
    building extension "telewavesim.rmat_f" sources
    f2py options: []
      adding 'build\src.win-amd64-3.7\build\src.win-amd64-3.7\telewavesim\fortranobject.c' to sources.
      adding 'build\src.win-amd64-3.7\build\src.win-amd64-3.7\telewavesim' to include_dirs.
      adding 'build\src.win-amd64-3.7\telewavesim\rmat_f-f2pywrappers2.f90' to sources.
    build_src: building npy-pkg config files
    running build_py
    running build_ext
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
    customize MSVCCompiler using build_ext
    warning: build_ext: f77_compiler=None is not available.
  
    building 'telewavesim.rmat_f' extension
    error: extension 'telewavesim.rmat_f' has Fortran sources but no Fortran compiler found
    ----------------------------------------
    ERROR: Failed building wheel for telewavesim
    Running setup.py clean for telewavesim
  Failed to build telewavesim
  Installing collected packages: obspy, telewavesim
      Running setup.py install for telewavesim ... error
      ERROR: Command errored out with exit status 1:
       command: 'C:\Users\ckh_000\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ckh_~1\\AppData\\Local\\Temp\\pip-req-build-_0kjatmr\\setup.py'"'"'; __file__='"'"'C:\\Users\\ckh_~1\\AppData\\Local\\Temp\\pip-req-build-_0kjatmr\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\ckh_~1\AppData\Local\Temp\pip-record-_oy46s3d\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\ckh_000\anaconda3\Include\telewavesim'
           cwd: C:\Users\ckh_~1\AppData\Local\Temp\pip-req-build-_0kjatmr\
      Complete output (78 lines):
      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
      Could not locate executable gfortran
      Could not locate executable f95
      Could not locate executable g95
      Could not locate executable efort
      Could not locate executable efc
      Could not locate executable flang
      don't know how to compile Fortran code on platform 'nt'
      C:\Users\ckh_000\anaconda3\lib\site-packages\numpy\distutils\system_info.py:1730: 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\ckh_000\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))()
      C:\Users\ckh_000\anaconda3\lib\site-packages\numpy\distutils\system_info.py:471: 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 cl().get_info(notfound_action)
      running install
      running build
      running config_cc
      unifing config_cc, config, build_clib, build_ext, build commands --compiler options
      running config_fc
      unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
      running build_src
      build_src
      building extension "telewavesim.rmat_f" sources
      f2py options: []
        adding 'build\src.win-amd64-3.7\build\src.win-amd64-3.7\telewavesim\fortranobject.c' to sources.
        adding 'build\src.win-amd64-3.7\build\src.win-amd64-3.7\telewavesim' to include_dirs.
        adding 'build\src.win-amd64-3.7\telewavesim\rmat_f-f2pywrappers2.f90' to sources.
      build_src: building npy-pkg config files
      running build_py
      creating build\lib.win-amd64-3.7
      creating build\lib.win-amd64-3.7\telewavesim
      copying telewavesim\doc.py -&gt; build\lib.win-amd64-3.7\telewavesim
      copying telewavesim\elast.py -&gt; build\lib.win-amd64-3.7\telewavesim
      copying telewavesim\utils.py -&gt; build\lib.win-amd64-3.7\telewavesim
      copying telewavesim\wiggle.py -&gt; build\lib.win-amd64-3.7\telewavesim
      copying telewavesim\__init__.py -&gt; build\lib.win-amd64-3.7\telewavesim
      creating build\lib.win-amd64-3.7\telewavesim\tests
      copying telewavesim\tests\test_0_imports.py -&gt; build\lib.win-amd64-3.7\telewavesim\tests
      copying telewavesim\tests\test_notebooks.py -&gt; build\lib.win-amd64-3.7\telewavesim\tests
      copying telewavesim\tests\test_routines.py -&gt; build\lib.win-amd64-3.7\telewavesim\tests
      copying telewavesim\tests\test_utils.py -&gt; build\lib.win-amd64-3.7\telewavesim\tests
      copying telewavesim\tests\__init__.py -&gt; build\lib.win-amd64-3.7\telewavesim\tests
      creating build\lib.win-amd64-3.7\telewavesim\examples
      copying telewavesim\examples\0-Start-Here.ipynb -&gt; build\lib.win-amd64-3.7\telewavesim\examples
      creating build\lib.win-amd64-3.7\telewavesim\examples\models
      copying telewavesim\examples\models\model_Audet2016.txt -&gt; build\lib.win-amd64-3.7\telewavesim\examples\models
      copying telewavesim\examples\models\model_Porter2011.txt -&gt; build\lib.win-amd64-3.7\telewavesim\examples\models
      copying telewavesim\examples\models\model_SKS.txt -&gt; build\lib.win-amd64-3.7\telewavesim\examples\models
      creating build\lib.win-amd64-3.7\telewavesim\examples\Notebooks
      copying telewavesim\examples\Notebooks\sim_obs_Audet2016.ipynb -&gt; build\lib.win-amd64-3.7\telewavesim\examples\Notebooks
      copying telewavesim\examples\Notebooks\sim_Prfs_Porter2011.ipynb -&gt; build\lib.win-amd64-3.7\telewavesim\examples\Notebooks
      copying telewavesim\examples\Notebooks\sim_SKS.ipynb -&gt; build\lib.win-amd64-3.7\telewavesim\examples\Notebooks
      running build_ext
      No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
      customize MSVCCompiler
      customize MSVCCompiler using build_ext
      warning: build_ext: f77_compiler=None is not available.
  
      building 'telewavesim.rmat_f' extension
      error: extension 'telewavesim.rmat_f' has Fortran sources but no Fortran compiler found
      ----------------------------------------
  ERROR: Command errored out with exit status 1: 'C:\Users\ckh_000\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ckh_~1\\AppData\\Local\\Temp\\pip-req-build-_0kjatmr\\setup.py'"'"'; __file__='"'"'C:\\Users\\ckh_~1\\AppData\\Local\\Temp\\pip-req-build-_0kjatmr\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\ckh_~1\AppData\Local\Temp\pip-record-_oy46s3d\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\ckh_000\anaconda3\Include\telewavesim' Check the logs for full command output.
  </code></pre>