title: How do I solve an installation error when setting up pipenv with pycharm?
body: <p>I am trying to use pipenv in Pycharm, but I get an error when I try to set it up.</p>
  <p>I am on macOS Catalina 10.15.5 (19F101)</p>
  <p>I installed python3.8 with homebrew when I ran <code>brew install pipenv</code>. Actually, I have two Python 3 installations on my machine. Python 3.7 which I have from an installer and the python 3.8 binary that was installed automatically when I installed pipenv. I have tried every other solution online and none seem to solve this problem:</p>
  <pre><code>pipenv.patched.notpip._internal.exceptions.InstallationError: Command errored out with exit status 1: python setup.py egg_info
  </code></pre>
  <p>Here is a screenshot of my problem:</p>
  <p><a href="https://i.stack.imgur.com/gzqrC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gzqrC.png" alt="enter image description here" /></a></p>
  <p>This is shown in the &quot;command output&quot; section:</p>
  <pre><code>    Virtualenv already exists!
      Removing existing virtualenv…
      Warning: the environment variable LANG is not set!
      We recommend setting this in ~/.profile (or equivalent) for proper expected behavior.
      Creating a virtualenv for this project…
      Pipfile: /Users/xxxxxxxxxx/Documents/Programming/myproject/Pipfile
      Using /usr/local/bin/python3 (3.8.5) to create virtualenv…
      
      ⠋ Creating virtual environment...
      ⠙ Creating virtual environment...
      ⠹ Creating virtual environment...
      ⠸ Creating virtual environment...
      ⠼ Creating virtual environment...
      ⠴ Creating virtual environment...
      ⠦ Creating virtual environment...
      ⠧ Creating virtual environment...
      ⠇ Creating virtual environment...
      ⠏ Creating virtual environment...
      ⠋ Creating virtual environment...
      ⠙ Creating virtual environment...
      ⠹ Creating virtual environment...
      ⠸ Creating virtual environment...
      ⠼ Creating virtual environment...
      ⠴ Creating virtual environment...
      ⠦ Creating virtual environment...
      ⠧ Creating virtual environment...
      ⠇ Creating virtual environment...
      ⠏ Creating virtual environment...
      ⠋ Creating virtual environment...
      ⠙ Creating virtual environment...
      ⠹ Creating virtual environment...
      ⠸ Creating virtual environment...
      ⠼ Creating virtual environment...
      ⠴ Creating virtual environment...
      ⠦ Creating virtual environment...
      ⠧ Creating virtual environment...
      ⠇ Creating virtual environment...
      ⠏ Creating virtual environment...
      ⠋ Creating virtual environment...
      ⠙ Creating virtual environment...
      ⠹ Creating virtual environment...
      ⠸ Creating virtual environment...
      ⠼ Creating virtual environment...
      ⠴ Creating virtual environment...
      ⠦ Creating virtual environment...
      ⠧ Creating virtual environment...
      ⠇ Creating virtual environment...
      ⠏ Creating virtual environment...
      ⠋ Creating virtual environment...
      ⠙ Creating virtual environment...
      ⠹ Creating virtual environment...
      ⠸ Creating virtual environment...
      ⠼ Creating virtual environment...
      ⠴ Creating virtual environment...created virtual environment CPython3.8.5.final.0-64 in 2397ms
        creator CPython3Posix(dest=/Users/xxxxxxxxxx/.local/share/virtualenvs/myproject--T_4UUiG, clear=False, global=False)
        seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/xxxxxxxxxx/Library/Application Support/virtualenv)
          added seed packages: pip==20.2.1, setuptools==49.2.1, wheel==0.34.2
        activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
      
      ✔ Successfully created virtual environment! 
      Virtualenv location: /Users/xxxxxxxxxx/.local/share/virtualenvs/myproject--T_4UUiG
      Pipfile.lock not found, creating…
      Locking [dev-packages] dependencies…
      Locking [packages] dependencies…
      
      ⠋ Locking...
      Building requirements...
      
      ⠙ Locking...
      ⠹ Locking...
      ⠸ Locking...
      ⠼ Locking...
      ⠴ Locking...
      ⠦ Locking...
      ⠧ Locking...
      ⠇ Locking...
      ⠏ Locking...
      ⠋ Locking...
      ⠙ Locking...
      ⠹ Locking...
      ⠸ Locking...
    (Tons of locking messages)
      ⠦ Locking...
      ⠧ Locking...
      ⠇ Locking...
      ⠏ Locking...
      Resolving dependencies...  
      ⠋ Locking...
      ⠙ Locking...
      ⠹ Locking...
      ⠸ Locking...
      ⠼ Locking...
      ⠴ Locking...
      ⠦ Locking...
      ⠧ Locking...
      ⠇ Locking...
      ⠏ Locking...
      ⠋ Locking...
      ⠙ Locking...
      ⠹ Locking...
      ⠸ Locking...
      ⠼ Locking...
      ⠴ Locking...
      ⠦ Locking...
      ⠧ Locking...
      ⠇ Locking...
      (Tons of locking messages)
      ⠼ Locking...
      ⠴ Locking...
      ⠦ Locking...
      ⠧ Locking...
      ⠇ Locking...
      ⠏ Locking...
      ⠋ Locking...
      ⠙ Locking...
      ⠹ Locking...
      ⠸ Locking...
      ⠼ Locking...
      ⠴ Locking...
      ⠦ Locking...
      ⠧ Locking...
      ⠇ Locking...
      ⠏ Locking...
      ⠋ Locking...
      ⠙ Locking...
      ⠹ Locking...
      ⠸ Locking...
      ⠼ Locking...
      ⠴ Locking...
      ⠦ Locking...
      ⠧ Locking...
      ⠇ Locking...
      ⠏ Locking...
      ⠋ Locking...
      ⠙ Locking...
      ⠹ Locking...
      ⠸ Locking...
      ⠼ Locking...
      ⠴ Locking...
      ⠦ Locking...
      ⠧ Locking...
      ⠇ Locking...
      ⠏ Locking...
      ⠋ Locking...
      ⠙ Locking...
      ⠹ Locking...
      ⠸ Locking...
      ⠼ Locking...
      ⠴ Locking...
      ⠦ Locking...
      ⠧ Locking...
      ⠇ Locking...
      ⠏ Locking...
      ⠋ Locking...
      ⠙ Locking...
      ⠹ Locking...
      ⠸ Locking...
      ⠼ Locking...
      ⠴ Locking...
      ⠦ Locking...
      ⠧ Locking...
      ⠇ Locking...
      ⠏ Locking...
      ⠋ Locking...
      ⠙ Locking...
      ⠹ Locking...
      ⠸ Locking...
      ⠼ Locking...
      ⠴ Locking...
      ⠦ Locking...
      ⠧ Locking...
      ⠇ Locking...
      ⠏ Locking...
      ⠋ Locking...
      ⠙ Locking...
      ⠹ Locking...
      ⠸ Locking...
      ⠼ Locking...
      ⠴ Locking...
      ⠦ Locking...
      ⠧ Locking...
      ⠇ Locking...
      ⠏ Locking...
      ⠋ Locking...
      ⠙ Locking...
      ⠹ Locking...
      ⠸ Locking...
      ⠼ Locking...
      ⠴ Locking...
      ⠦ Locking...
      ⠧ Locking...
      ⠇ Locking...
      ⠏ Locking...
      ⠋ Locking...
      ⠙ Locking...
      ⠹ Locking...
      ⠸ Locking...
      ⠼ Locking...
      ⠴ Locking...
      ⠦ Locking...
      ⠧ Locking...
      ⠇ Locking...
      ⠏ Locking...
      ⠋ Locking...
      ⠙ Locking...
      ⠹ Locking...
      ⠸ Locking...
      ⠼ Locking...
      ⠴ Locking...
      ⠦ Locking...
      ⠧ Locking...
      ⠇ Locking...
      ⠏ Locking...
      ⠋ Locking...
      ⠙ Locking...
      ⠹ Locking...
      ⠸ Locking...
      ⠼ Locking...
      ⠴ Locking...
      ⠦ Locking...
      ⠧ Locking...
      ⠇ Locking...
      ⠏ Locking...
      ⠋ Locking...
      ⠙ Locking...
      ⠹ Locking...
      ⠸ Locking...
      ⠼ Locking...
      ⠴ Locking...
      ⠦ Locking...
      ⠧ Locking...
      ⠇ Locking...
      ⠏ Locking...
      ⠋ Locking...
      ⠙ Locking...
      ⠹ Locking...
      ⠸ Locking...
      ⠼ Locking...
      ⠴ Locking...
      ⠦ Locking...
      ⠧ Locking...
      ⠇ Locking...
      ⠏ Locking...
      ⠋ Locking...
      ⠙ Locking...
      ⠹ Locking...
      ⠸ Locking...
      ⠼ Locking...
      ⠴ Locking...
      ⠦ Locking...
      ⠧ Locking...
      ⠇ Locking...
      ⠏ Locking...
      ⠋ Locking...
      ⠙ Locking...
      ⠹ Locking...
      ⠸ Locking...
      ⠼ Locking...
      ⠴ Locking...
      ⠦ Locking...
      ⠧ Locking...
      ⠇ Locking...
      ⠏ Locking...
      ⠋ Locking...
      ⠙ Locking...
      ⠹ Locking...
      ⠸ Locking...
      ⠼ Locking...
      ⠴ Locking...
      ⠦ Locking...
      ⠧ Locking...
      ⠇ Locking...
      ⠏ Locking...
      ⠋ Locking...
      ⠙ Locking...
      ⠹ Locking...
      ⠸ Locking...
      ⠼ Locking...
      ⠴ Locking...
      ⠦ Locking...
      ⠧ Locking...
      ⠇ Locking...
      ⠏ Locking...
      ⠋ Locking...
      ⠙ Locking...
      ⠹ Locking...
      ⠸ Locking...
      ⠼ Locking...
      ⠴ Locking...
      ⠦ Locking...
      ⠧ Locking...
      ⠇ Locking...
      ⠏ Locking...
      ⠋ Locking...
      ⠙ Locking...
      ⠹ Locking...
      ⠸ Locking...
      ⠼ Locking...
      ⠴ Locking...
      ⠦ Locking...✘ Locking Failed! 
      ERROR:pip.subprocessor:Command errored out with exit status 1:
       command: /Users/xxxxxxxxxx/.local/share/virtualenvs/myproject--T_4UUiG/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '&quot;'&quot;'/private/var/folders/tq/0dy10hb513z0slf8n7gcspyw0000gn/T/pip-resolver-pjxum28o/toolz/setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'/private/var/folders/tq/0dy10hb513z0slf8n7gcspyw0000gn/T/pip-resolver-pjxum28o/toolz/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 /private/var/folders/tq/0dy10hb513z0slf8n7gcspyw0000gn/T/pip-resolver-pjxum28o/toolz/pip-egg-info
           cwd: /private/var/folders/tq/0dy10hb513z0slf8n7gcspyw0000gn/T/pip-resolver-pjxum28o/toolz/
      Complete output (10 lines):
      Traceback (most recent call last):
        File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
        File &quot;/private/var/folders/tq/0dy10hb513z0slf8n7gcspyw0000gn/T/pip-resolver-pjxum28o/toolz/setup.py&quot;, line 5, in &lt;module&gt;
          import toolz
        File &quot;/private/var/folders/tq/0dy10hb513z0slf8n7gcspyw0000gn/T/pip-resolver-pjxum28o/toolz/toolz/__init__.py&quot;, line 3, in &lt;module&gt;
          from .functoolz import *
        File &quot;/private/var/folders/tq/0dy10hb513z0slf8n7gcspyw0000gn/T/pip-resolver-pjxum28o/toolz/toolz/functoolz.py&quot;, line 501
          f.__name__ for f in reversed((self.first,) + self.funcs),
          ^
      SyntaxError: Generator expression must be parenthesized
      ----------------------------------------
      Traceback (most recent call last):
        File &quot;/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/resolver.py&quot;, line 807, in &lt;module&gt;
          main()
        File &quot;/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/resolver.py&quot;, line 802, in main
          _main(parsed.pre, parsed.clear, parsed.verbose, parsed.system, parsed.write,
        File &quot;/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/resolver.py&quot;, line 785, in _main
          resolve_packages(pre, clear, verbose, system, write, requirements_dir, packages)
        File &quot;/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/resolver.py&quot;, line 746, in resolve_packages
          results, resolver = resolve(
        File &quot;/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/resolver.py&quot;, line 728, in resolve
          return resolve_deps(
        File &quot;/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/utils.py&quot;, line 1378, in resolve_deps
          results, hashes, markers_lookup, resolver, skipped = actually_resolve_deps(
        File &quot;/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/utils.py&quot;, line 1093, in actually_resolve_deps
          resolver.resolve()
        File &quot;/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/utils.py&quot;, line 808, in resolve
          results = self.resolver.resolve(max_rounds=environments.PIPENV_MAX_ROUNDS)
        File &quot;/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/patched/piptools/resolver.py&quot;, line 180, in resolve
          has_changed, best_matches = self._resolve_one_round()
        File &quot;/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/patched/piptools/resolver.py&quot;, line 268, in _resolve_one_round
          their_constraints.extend(self._iter_dependencies(best_match))
        File &quot;/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/patched/piptools/resolver.py&quot;, line 383, in _iter_dependencies
          dependencies = self.repository.get_dependencies(ireq)
        File &quot;/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/patched/piptools/repositories/pypi.py&quot;, line 226, in get_dependencies
          legacy_results = self.get_legacy_dependencies(ireq)
        File &quot;/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/patched/piptools/repositories/pypi.py&quot;, line 347, in get_legacy_dependencies
          results, ireq = self.resolve_reqs(
        File &quot;/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/patched/piptools/repositories/pypi.py&quot;, line 303, in resolve_reqs
          results = resolver._resolve_one(reqset, ireq)
        File &quot;/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/patched/notpip/_internal/legacy_resolve.py&quot;, line 339, in _resolve_one
          abstract_dist = self._get_abstract_dist_for(req_to_install)
        File &quot;/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/patched/notpip/_internal/legacy_resolve.py&quot;, line 287, in _get_abstract_dist_for
          abstract_dist = self.preparer.prepare_linked_requirement(req)
        File &quot;/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/patched/notpip/_internal/operations/prepare.py&quot;, line 508, in prepare_linked_requirement
          abstract_dist = _get_prepared_distribution(
        File &quot;/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/patched/notpip/_internal/operations/prepare.py&quot;, line 95, in _get_prepared_distribution
          abstract_dist.prepare_distribution_metadata(finder, build_isolation)
        File &quot;/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/patched/notpip/_internal/distributions/sdist.py&quot;, line 40, in prepare_distribution_metadata
          self.req.prepare_metadata()
        File &quot;/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/patched/notpip/_internal/req/req_install.py&quot;, line 564, in prepare_metadata
          self.metadata_directory = self._generate_metadata()
        File &quot;/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/patched/notpip/_internal/req/req_install.py&quot;, line 538, in _generate_metadata
          return generate_metadata_legacy(
        File &quot;/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/patched/notpip/_internal/operations/build/metadata_legacy.py&quot;, line 115, in generate_metadata
          call_subprocess(
        File &quot;/usr/local/Cellar/pipenv/2020.8.13/libexec/lib/python3.8/site-packages/pipenv/patched/notpip/_internal/utils/subprocess.py&quot;, line 242, in call_subprocess
          raise InstallationError(exc_msg)
      pipenv.patched.notpip._internal.exceptions.InstallationError: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  </code></pre>