title: yfinance - ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output
body: <p>I am trying to install yfinance &quot;sudo -H pip install yfinance&quot; and keep getting the following error at the bottom of this post. I have uninstalled/installed pip. I have uninstalled/installed setuptools via pip and have tried the following commands:</p>
  <pre><code>python3 -m ensurepip --upgrade
  
  Requirement already up-to-date: setuptools in /usr/local/lib/python3.8/site-packages (49.2.0)
  
  Requirement already up-to-date: pip in /usr/local/lib/python3.8/site-packages (20.1.1)
  
  pip install --upgrade pip
  
  Requirement already up-to-date: pip in /usr/local/lib/python3.8/site-packages (20.1.1)
  
  pip install --upgrade setuptools
  
  Requirement already up-to-date: setuptools in /usr/local/lib/python3.8/site-packages (49.2.0)
  </code></pre>
  <p>Python Version</p>
  <pre><code>python --version
  
  Python 3.8.3
  </code></pre>
  <p>Pip Version</p>
  <pre><code>pip --version
  
  pip 20.1.1 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)
  </code></pre>
  <p>System Update Checks</p>
  <pre><code>sudo apt-get upgrade
  sudo apt-get update
  </code></pre>
  <hr />
  <p><strong>Actual error code below when I run &quot;sudo -H pip install yfinance&quot;</strong></p>
  <pre><code>*****@*******:~/Desktop/Project$ sudo -H pip install yfinance
  
  Collecting yfinance
  
    Using cached yfinance-0.1.54.tar.gz (19 kB)
  
      ERROR: Command errored out with exit status 1:
  
       command: /usr/local/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '&quot;'&quot;'/tmp/pip-install-xpuca0pe/yfinance/setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'/tmp/pip-install-xpuca0pe/yfinance/setup.py'&quot;'&quot;';f=getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__);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;'))' egg_info --egg-base /tmp/pip-pip-egg-info-1j4zanh6
  
           cwd: /tmp/pip-install-xpuca0pe/yfinance/
  
      Complete output (11 lines):
  
      Traceback (most recent call last):
  
        File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
  
        File &quot;/usr/local/lib/python3.8/site-packages/setuptools/__init__.py&quot;, line 23, in &lt;module&gt;
          from setuptools.dist import Distribution
  
        File &quot;/usr/local/lib/python3.8/site-packages/setuptools/dist.py&quot;, line 34, in &lt;module&gt;
          from setuptools import windows_support
  
        File &quot;/usr/local/lib/python3.8/site-packages/setuptools/windows_support.py&quot;, line 2, in &lt;module&gt;
          import ctypes
  
        File &quot;/usr/local/lib/python3.8/ctypes/__init__.py&quot;, line 7, in &lt;module&gt;
          from _ctypes import Union, Structure, Array
  
      ModuleNotFoundError: No module named '_ctypes'
      ----------------------------------------
  ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  </code></pre>
  <p>How do I fix this error?</p>