2
respostas

Instalação dos requirements

Está ocorrendo o erro abaixo ao executar o pip install -r requirements.txt

Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [21 lines of output]
      running egg_info
      writing psycopg2.egg-info/PKG-INFO
      writing dependency_links to psycopg2.egg-info/dependency_links.txt
      writing top-level names to psycopg2.egg-info/top_level.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>).
      
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

requirements.txt:

asgiref==3.2.10
astroid==2.4.2
dj-database-url==0.5.0
Django==3.0.8
django-filter==2.3.0
django-heroku==0.3.1
djangorestframework==3.11.0
Faker==4.1.1
gunicorn==20.0.4
isort==4.3.21
lazy-object-proxy==1.4.3
mccabe==0.6.1
pg==0.1
Pillow==7.2.0
psycopg2==2.8.5
psycopg2-binary==2.8.5
pylint==2.5.3
PyOpenGL==3.1.5
python-dateutil==2.8.1
pytz==2020.1
six==1.15.0
sqlparse==0.3.1
text-unidecode==1.3
toml==0.10.1
typed-ast==1.5.4
validate-docbr==1.7.0
whitenoise==5.2.0
wrapt==1.12.1
2 respostas

Olá,

Para adicionar o requirements.txt, utilize o seguinte comando: pip freeze > requirements.txt Obs.: Não se esqueça de que, a cada instalação nova, rode o comando acima novamente.

Espero ter colaborado para a sua dúvida.

Olá, bom dia, já fiz esse procedimento diversas vezes sem nenhum resultado positivo.