简体   繁体   中英

Python 3 - Pipenv Can't Install Getting Error

I am new to python and trying to install dependencies. I understand that pipenv install installs Pipfile.lock which lets me install my needed dependencies. Below is the ERROR itself

['ERROR: Command errored out with exit status 1:', '     command: /Users/oscarpacheco/.local/share/virtualenvs/CS-Build-Week-1-4GOi2kZe/bin/python3.7 -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'/private/var/folders/q9/fd9xx1l95xv6dcrwnqqtfhpm0000gn/T/pip-install-1j4f7p9x/psycopg2/setup.py\'"\'"\'; __file__=\'"\'"\'/private/var/folders/q9/fd9xx1l95xv6dcrwnqqtfhpm0000gn/T/pip-install-1j4f7p9x/psycopg2/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 /private/var/folders/q9/fd9xx1l95xv6dcrwnqqtfhpm0000gn/T/pip-install-1j4f7p9x/psycopg2/pip-egg-info', '         cwd: /private/var/folders/q9/fd9xx1l95xv6dcrwnqqtfhpm0000gn/T/pip-install-1j4f7p9x/psycopg2/', '    Complete output (23 lines):', '    running egg_info', '    creating /private/var/folders/q9/fd9xx1l95xv6dcrwnqqtfhpm0000gn/T/pip-install-1j4f7p9x/psycopg2/pip-egg-info/psycopg2.egg-info', '    writing /private/var/folders/q9/fd9xx1l95xv6dcrwnqqtfhpm0000gn/T/pip-install-1j4f7p9x/psycopg2/pip-egg-info/psycopg2.egg-info/PKG-INFO', '    writing dependency_links to /private/var/folders/q9/fd9xx1l95xv6dcrwnqqtfhpm0000gn/T/pip-install-1j4f7p9x/psycopg2/pip-egg-info/psycopg2.egg-info/dependency_links.txt', '    writing top-level names to /private/var/folders/q9/fd9xx1l95xv6dcrwnqqtfhpm0000gn/T/pip-install-1j4f7p9x/psycopg2/pip-egg-info/psycopg2.egg-info/top_level.txt', "    writing manifest file '/private/var/folders/q9/fd9xx1l95xv6dcrwnqqtfhpm0000gn/T/pip-install-1j4f7p9x/psycopg2/pip-egg-info/psycopg2.egg-info/SOURCES.txt'", '    ', '    Error: pg_config executable not found.', '    ', '    pg_config is required to build psycopg2 from source.  Please add the directory', '    containing pg_config to the $PATH or specify the full executable path with the', '    option:', '    ', '        python setup.py build_ext --pg-config /path/to/pg_config build ...', '    ', "    or with the pg_config option in 'setup.cfg'.", '    ', '    If you prefer to avoid building psycopg2 from source, please install the PyPI', "    'psycopg2-binary' package instead.", '    ', "    For further information please check the 'doc/src/install.rst' file (also at", '    <https://www.psycopg.org/docs/install.html>).', '    ', '    ----------------------------------------', 'ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.']
ERROR: ERROR: Package installation failed...
  ☤  ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/1 — 00:00:01``` 

Pipfile.lock doesn't install the required dependencies or packages rather it's a final update check on the dependencies that were installed through Pipenv.

Pipenv at a high-level is used for running, installing and executing the installed packages within a python environment. It also manages your virtual environments.

So basically, the whole state is formed of the pip environment and virtualenv of your choice.

If you want you can bypass the lock step by doing this: pipenv install --skip-lock . In most cases, pipfile.lock errors occur due to spelling mistakes within the pipfile.

This is a good tutorial, see this link .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM