Herokuにデプロイする新しいDjangoプロジェクトを設定していますが、Django Herokuデプロイメントガイドに従っていると、pipのインストール中にエラーが発生しますDjango-heroku '。
私は走っています:
OS:MacOS Mojave 10.14.6
virtualenv:python3
pipフリーズ出力:
(env) MacBook-Pro:testing_Django sudoxx2$ pip freeze
dj-database-url==0.5.0
Django==2.2.3
gunicorn==19.9.0
psycopg2-binary==2.8.3
pytz==2019.1
sqlparse==0.3.0
whitenoise==4.1.3
pip install Django-heroku
コマンドを実行した後のエラー出力は次のとおりです。
(env) MacBook-Pro:testing_Django sudoxx2$ pip install psycopg2-binary
Collecting psycopg2-binary
Using cached https://files.pythonhosted.org/packages/ee/ed/2772267467ba5c21a73d37149da0b49a4343c6646d501dbb1450b492d40a/psycopg2_binary-2.8.3-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Installing collected packages: psycopg2-binary
Successfully installed psycopg2-binary-2.8.3
(env) MacBook-Pro:testing_Django sudoxx2$ pip install Django-heroku
Collecting Django-heroku
Using cached https://files.pythonhosted.org/packages/59/af/5475a876c5addd5a3494db47d9f7be93cc14d3a7603542b194572791b6c6/Django_heroku-0.3.1-py2.py3-none-any.whl
Collecting psycopg2 (from Django-heroku)
Using cached https://files.pythonhosted.org/packages/5c/1c/6997288da181277a0c29bc39a5f9143ff20b8c99f2a7d059cfb55163e165/psycopg2-2.8.3.tar.gz
Requirement already satisfied: whitenoise in /Users/sudoxx2/Documents/github/delete_copy/env/lib/python3.7/site-packages (from Django-heroku) (4.1.3)
Requirement already satisfied: Django in /Users/sudoxx2/Documents/github/delete_copy/env/lib/python3.7/site-packages (from Django-heroku) (2.2.3)
Requirement already satisfied: dj-database-url>=0.5.0 in /Users/sudoxx2/Documents/github/delete_copy/env/lib/python3.7/site-packages (from Django-heroku) (0.5.0)
Requirement already satisfied: sqlparse in /Users/sudoxx2/Documents/github/delete_copy/env/lib/python3.7/site-packages (from Django->Django-heroku) (0.3.0)
Requirement already satisfied: pytz in /Users/sudoxx2/Documents/github/delete_copy/env/lib/python3.7/site-packages (from Django->Django-heroku) (2019.1)
Installing collected packages: psycopg2, Django-heroku
Running setup.py install for psycopg2 ... error
ERROR: Command errored out with exit status 1:
command: /Users/sudoxx2/Documents/github/delete_copy/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-install-cq6yuehb/psycopg2/setup.py'"'"'; __file__='"'"'/private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-install-cq6yuehb/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-record-tyidyv7j/install-record.txt --single-version-externally-managed --compile --install-headers /Users/sudoxx2/Documents/github/delete_copy/env/include/site/python3.7/psycopg2
cwd: /private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-install-cq6yuehb/psycopg2/
Complete output (48 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.7
creating build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/_json.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/extras.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/compat.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/errorcodes.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/tz.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/_range.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/_ipaddress.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/_lru_cache.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/extensions.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/errors.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/sql.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/pool.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.macosx-10.9-x86_64-3.7
creating build/temp.macosx-10.9-x86_64-3.7/psycopg
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Arch x86_64 -g -DPSYCOPG_VERSION=2.8.3 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=110004 -DHAVE_LO64=1 -I/Users/sudoxx2/Documents/github/delete_copy/env/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I. -I/usr/local/Cellar/postgresql/11.4/include -I/usr/local/Cellar/postgresql/11.4/include/server -c psycopg/psycopgmodule.c -o build/temp.macosx-10.9-x86_64-3.7/psycopg/psycopgmodule.o
In file included from psycopg/psycopgmodule.c:27:
In file included from ./psycopg/psycopg.h:34:
/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/Python.h:30:10: warning: non-portable path to file '<String.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include <string.h>
^~~~~~~~~~
<String.h>
In file included from psycopg/psycopgmodule.c:27:
In file included from ./psycopg/psycopg.h:34:
In file included from /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/Python.h:30:
/usr/local/include/string.h:25:10: fatal error: 'plist/Node.h' file not found
#include <plist/Node.h>
^~~~~~~~~~~~~~
1 warning and 1 error generated.
It appears you are missing some prerequisite to build the package from source.
You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.
For further information please check the 'doc/src/install.rst' file (also at
<http://initd.org/psycopg/docs/install.html>).
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/sudoxx2/Documents/github/delete_copy/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-install-cq6yuehb/psycopg2/setup.py'"'"'; __file__='"'"'/private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-install-cq6yuehb/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-record-tyidyv7j/install-record.txt --single-version-externally-managed --compile --install-headers /Users/sudoxx2/Documents/github/delete_copy/env/include/site/python3.7/psycopg2 Check the logs for full command output.
(env) MacBook-Pro:testing_Django sudoxx2$ pip install psycopg2-binary
Collecting psycopg2-binary
Using cached https://files.pythonhosted.org/packages/ee/ed/2772267467ba5c21a73d37149da0b49a4343c6646d501dbb1450b492d40a/psycopg2_binary-2.8.3-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Installing collected packages: psycopg2-binary
Successfully installed psycopg2-binary-2.8.3
(env) MacBook-Pro:testing_Django sudoxx2$ pip install Django-heroku
Collecting Django-heroku
Using cached https://files.pythonhosted.org/packages/59/af/5475a876c5addd5a3494db47d9f7be93cc14d3a7603542b194572791b6c6/Django_heroku-0.3.1-py2.py3-none-any.whl
Collecting psycopg2 (from Django-heroku)
Using cached https://files.pythonhosted.org/packages/5c/1c/6997288da181277a0c29bc39a5f9143ff20b8c99f2a7d059cfb55163e165/psycopg2-2.8.3.tar.gz
Requirement already satisfied: whitenoise in /Users/sudoxx2/Documents/github/delete_copy/env/lib/python3.7/site-packages (from Django-heroku) (4.1.3)
Requirement already satisfied: Django in /Users/sudoxx2/Documents/github/delete_copy/env/lib/python3.7/site-packages (from Django-heroku) (2.2.3)
Requirement already satisfied: dj-database-url>=0.5.0 in /Users/sudoxx2/Documents/github/delete_copy/env/lib/python3.7/site-packages (from Django-heroku) (0.5.0)
Requirement already satisfied: sqlparse in /Users/sudoxx2/Documents/github/delete_copy/env/lib/python3.7/site-packages (from Django->Django-heroku) (0.3.0)
Requirement already satisfied: pytz in /Users/sudoxx2/Documents/github/delete_copy/env/lib/python3.7/site-packages (from Django->Django-heroku) (2019.1)
Installing collected packages: psycopg2, Django-heroku
Running setup.py install for psycopg2 ... error
ERROR: Command errored out with exit status 1:
command: /Users/sudoxx2/Documents/github/delete_copy/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-install-cq6yuehb/psycopg2/setup.py'"'"'; __file__='"'"'/private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-install-cq6yuehb/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-record-tyidyv7j/install-record.txt --single-version-externally-managed --compile --install-headers /Users/sudoxx2/Documents/github/delete_copy/env/include/site/python3.7/psycopg2
cwd: /private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-install-cq6yuehb/psycopg2/
Complete output (48 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.7
creating build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/_json.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/extras.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/compat.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/errorcodes.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/tz.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/_range.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/_ipaddress.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/_lru_cache.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/extensions.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/errors.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/sql.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/pool.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.macosx-10.9-x86_64-3.7
creating build/temp.macosx-10.9-x86_64-3.7/psycopg
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Arch x86_64 -g -DPSYCOPG_VERSION=2.8.3 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=110004 -DHAVE_LO64=1 -I/Users/sudoxx2/Documents/github/delete_copy/env/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I. -I/usr/local/Cellar/postgresql/11.4/include -I/usr/local/Cellar/postgresql/11.4/include/server -c psycopg/psycopgmodule.c -o build/temp.macosx-10.9-x86_64-3.7/psycopg/psycopgmodule.o
In file included from psycopg/psycopgmodule.c:27:
In file included from ./psycopg/psycopg.h:34:
/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/Python.h:30:10: warning: non-portable path to file '<String.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include <string.h>
^~~~~~~~~~
<String.h>
In file included from psycopg/psycopgmodule.c:27:
In file included from ./psycopg/psycopg.h:34:
In file included from /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/Python.h:30:
/usr/local/include/string.h:25:10: fatal error: 'plist/Node.h' file not found
#include <plist/Node.h>
^~~~~~~~~~~~~~
1 warning and 1 error generated.
It appears you are missing some prerequisite to build the package from source.
You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.
For further information please check the 'doc/src/install.rst' file (also at
<http://initd.org/psycopg/docs/install.html>).
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/sudoxx2/Documents/github/delete_copy/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-install-cq6yuehb/psycopg2/setup.py'"'"'; __file__='"'"'/private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-install-cq6yuehb/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-record-tyidyv7j/install-record.txt --single-version-externally-managed --compile --install-headers /Users/sudoxx2/Documents/github/delete_copy/env/include/site/python3.7/psycopg2 Check the logs for full command output.(env) MacBook-Pro:testing_Django sudoxx2$ pip install psycopg2-binary
Collecting psycopg2-binary
Using cached https://files.pythonhosted.org/packages/ee/ed/2772267467ba5c21a73d37149da0b49a4343c6646d501dbb1450b492d40a/psycopg2_binary-2.8.3-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Installing collected packages: psycopg2-binary
Successfully installed psycopg2-binary-2.8.3
(env) MacBook-Pro:testing_Django sudoxx2$ pip install Django-heroku
Collecting Django-heroku
Using cached https://files.pythonhosted.org/packages/59/af/5475a876c5addd5a3494db47d9f7be93cc14d3a7603542b194572791b6c6/Django_heroku-0.3.1-py2.py3-none-any.whl
Collecting psycopg2 (from Django-heroku)
Using cached https://files.pythonhosted.org/packages/5c/1c/6997288da181277a0c29bc39a5f9143ff20b8c99f2a7d059cfb55163e165/psycopg2-2.8.3.tar.gz
Requirement already satisfied: whitenoise in /Users/sudoxx2/Documents/github/delete_copy/env/lib/python3.7/site-packages (from Django-heroku) (4.1.3)
Requirement already satisfied: Django in /Users/sudoxx2/Documents/github/delete_copy/env/lib/python3.7/site-packages (from Django-heroku) (2.2.3)
Requirement already satisfied: dj-database-url>=0.5.0 in /Users/sudoxx2/Documents/github/delete_copy/env/lib/python3.7/site-packages (from Django-heroku) (0.5.0)
Requirement already satisfied: sqlparse in /Users/sudoxx2/Documents/github/delete_copy/env/lib/python3.7/site-packages (from Django->Django-heroku) (0.3.0)
Requirement already satisfied: pytz in /Users/sudoxx2/Documents/github/delete_copy/env/lib/python3.7/site-packages (from Django->Django-heroku) (2019.1)
Installing collected packages: psycopg2, Django-heroku
Running setup.py install for psycopg2 ... error
ERROR: Command errored out with exit status 1:
command: /Users/sudoxx2/Documents/github/delete_copy/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-install-cq6yuehb/psycopg2/setup.py'"'"'; __file__='"'"'/private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-install-cq6yuehb/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-record-tyidyv7j/install-record.txt --single-version-externally-managed --compile --install-headers /Users/sudoxx2/Documents/github/delete_copy/env/include/site/python3.7/psycopg2
cwd: /private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-install-cq6yuehb/psycopg2/
Complete output (48 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.7
creating build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/_json.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/extras.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/compat.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/errorcodes.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/tz.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/_range.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/_ipaddress.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/_lru_cache.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/extensions.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/errors.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/sql.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/pool.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.macosx-10.9-x86_64-3.7
creating build/temp.macosx-10.9-x86_64-3.7/psycopg
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Arch x86_64 -g -DPSYCOPG_VERSION=2.8.3 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=110004 -DHAVE_LO64=1 -I/Users/sudoxx2/Documents/github/delete_copy/env/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I. -I/usr/local/Cellar/postgresql/11.4/include -I/usr/local/Cellar/postgresql/11.4/include/server -c psycopg/psycopgmodule.c -o build/temp.macosx-10.9-x86_64-3.7/psycopg/psycopgmodule.o
In file included from psycopg/psycopgmodule.c:27:
In file included from ./psycopg/psycopg.h:34:
/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/Python.h:30:10: warning: non-portable path to file '<String.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include <string.h>
^~~~~~~~~~
<String.h>
In file included from psycopg/psycopgmodule.c:27:
In file included from ./psycopg/psycopg.h:34:
In file included from /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/Python.h:30:
/usr/local/include/string.h:25:10: fatal error: 'plist/Node.h' file not found
#include <plist/Node.h>
^~~~~~~~~~~~~~
1 warning and 1 error generated.
It appears you are missing some prerequisite to build the package from source.
You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.
For further information please check the 'doc/src/install.rst' file (also at
<http://initd.org/psycopg/docs/install.html>).
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/sudoxx2/Documents/github/delete_copy/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-install-cq6yuehb/psycopg2/setup.py'"'"'; __file__='"'"'/private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-install-cq6yuehb/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-record-tyidyv7j/install-record.txt --single-version-externally-managed --compile --install-headers /Users/sudoxx2/Documents/github/delete_copy/env/include/site/python3.7/psycopg2 Check the logs for full command output.(env) MacBook-Pro:testing_Django sudoxx2$ pip install psycopg2-binary
Collecting psycopg2-binary
Using cached https://files.pythonhosted.org/packages/ee/ed/2772267467ba5c21a73d37149da0b49a4343c6646d501dbb1450b492d40a/psycopg2_binary-2.8.3-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Installing collected packages: psycopg2-binary
Successfully installed psycopg2-binary-2.8.3
(env) MacBook-Pro:testing_Django sudoxx2$ pip install Django-heroku
Collecting Django-heroku
Using cached https://files.pythonhosted.org/packages/59/af/5475a876c5addd5a3494db47d9f7be93cc14d3a7603542b194572791b6c6/Django_heroku-0.3.1-py2.py3-none-any.whl
Collecting psycopg2 (from Django-heroku)
Using cached https://files.pythonhosted.org/packages/5c/1c/6997288da181277a0c29bc39a5f9143ff20b8c99f2a7d059cfb55163e165/psycopg2-2.8.3.tar.gz
Requirement already satisfied: whitenoise in /Users/sudoxx2/Documents/github/delete_copy/env/lib/python3.7/site-packages (from Django-heroku) (4.1.3)
Requirement already satisfied: Django in /Users/sudoxx2/Documents/github/delete_copy/env/lib/python3.7/site-packages (from Django-heroku) (2.2.3)
Requirement already satisfied: dj-database-url>=0.5.0 in /Users/sudoxx2/Documents/github/delete_copy/env/lib/python3.7/site-packages (from Django-heroku) (0.5.0)
Requirement already satisfied: sqlparse in /Users/sudoxx2/Documents/github/delete_copy/env/lib/python3.7/site-packages (from Django->Django-heroku) (0.3.0)
Requirement already satisfied: pytz in /Users/sudoxx2/Documents/github/delete_copy/env/lib/python3.7/site-packages (from Django->Django-heroku) (2019.1)
Installing collected packages: psycopg2, Django-heroku
Running setup.py install for psycopg2 ... error
ERROR: Command errored out with exit status 1:
command: /Users/sudoxx2/Documents/github/delete_copy/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-install-cq6yuehb/psycopg2/setup.py'"'"'; __file__='"'"'/private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-install-cq6yuehb/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-record-tyidyv7j/install-record.txt --single-version-externally-managed --compile --install-headers /Users/sudoxx2/Documents/github/delete_copy/env/include/site/python3.7/psycopg2
cwd: /private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-install-cq6yuehb/psycopg2/
Complete output (48 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.7
creating build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/_json.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/extras.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/compat.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/errorcodes.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/tz.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/_range.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/_ipaddress.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/_lru_cache.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/extensions.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/errors.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/sql.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
copying lib/pool.py -> build/lib.macosx-10.9-x86_64-3.7/psycopg2
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.macosx-10.9-x86_64-3.7
creating build/temp.macosx-10.9-x86_64-3.7/psycopg
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Arch x86_64 -g -DPSYCOPG_VERSION=2.8.3 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=110004 -DHAVE_LO64=1 -I/Users/sudoxx2/Documents/github/delete_copy/env/include -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I. -I/usr/local/Cellar/postgresql/11.4/include -I/usr/local/Cellar/postgresql/11.4/include/server -c psycopg/psycopgmodule.c -o build/temp.macosx-10.9-x86_64-3.7/psycopg/psycopgmodule.o
In file included from psycopg/psycopgmodule.c:27:
In file included from ./psycopg/psycopg.h:34:
/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/Python.h:30:10: warning: non-portable path to file '<String.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include <string.h>
^~~~~~~~~~
<String.h>
In file included from psycopg/psycopgmodule.c:27:
In file included from ./psycopg/psycopg.h:34:
In file included from /Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m/Python.h:30:
/usr/local/include/string.h:25:10: fatal error: 'plist/Node.h' file not found
#include <plist/Node.h>
^~~~~~~~~~~~~~
1 warning and 1 error generated.
It appears you are missing some prerequisite to build the package from source.
You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.
For further information please check the 'doc/src/install.rst' file (also at
<http://initd.org/psycopg/docs/install.html>).
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/sudoxx2/Documents/github/delete_copy/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-install-cq6yuehb/psycopg2/setup.py'"'"'; __file__='"'"'/private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-install-cq6yuehb/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/4d/s84v7k6d1dx_m_6qbd1wfbz80000gp/T/pip-record-tyidyv7j/install-record.txt --single-version-externally-managed --compile --install-headers /Users/sudoxx2/Documents/github/delete_copy/env/include/site/python3.7/psycopg2 Check the logs for full command output.
pip install psycopg2-binary
を試しましたが、うまくいきませんでした。
テストする新しいプロジェクトを作成しましたが、同じエラーが発生しました。
どんな助けでも素晴らしいでしょう。
私はWindows 10でテストしましたが、すべてが飛行色で合格し、herokuに展開できました。これはMojave OS固有のようです。
私は同じ手順をWindows 10でテストしましたが、すべてが飛行色で合格し、herokuにデプロイすることができました。
これはMAC OS Mojave固有のようです。
MacOS Mojave 10.14.6
は私が問題を抱えていたバージョンでした
私にとっての解決策は、Windows 10経由で展開するか、High Sierraなどの古いMac OSにダウングレードすることでした。
私はいくつかの解決策を試しましたが、最も簡単な解決策以外はどれもうまくいきませんでした:
pip3 install psycopg2==2.7.5
このコマンドは完全に機能しました(バージョンに問題があるようです)
最近問題に遭遇しました。私を助けたのは、pip3 install psycopg2 == 2.8.3以降のpip3 install Django-herokuです。
OS:MacOS Mojave 10.14.4
virtualenv:python3.6
私はherokuを使用していませんが、同じエラーが発生していました。これが私のためにそれを修正したものです:
Sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
その後、pip経由でインストールできるはずです。
(venv) MacBook-Pro:testing_Django user$ pip install psycopg2
(venv) MacBook-Pro:testing_Django user$ pip freeze
Django==2.2.4
psycopg2==2.8.3
pytz==2019.2
sqlparse==0.3.0
から: https://github.com/python-pillow/Pillow/issues/3438#issuecomment-435169249
postgres db、postgres clientおよびlibpq-devosコマンドを使用して、python environ
pip install psycopg2
詳細は http://initd.org/psycopg/docs/install.html を参照してください
私は同じ問題を抱えていて、Herokuがこれを修正するためにDjango-heroku
パッケージを更新しなかった理由を疑問に思っていました。しかし、これを修正するための更新を期待すべきではありません。 Django-herokuリポジトリがgithubで実現されました。 https://github.com/heroku/Django-heroku
。 https://github.com/heroku/Django-heroku/blob/master/setup.py
をよく見ると、要件としてpsycopg2
がリストされていることがわかります。それがなぜあなたのコンピュータにインストールしようとするのか。これに対する解決策。
1. Remove Django-heroku package from your requirements.
2. Remove and Django-heroku settings from settings.py
3. Set STATIC_ROOT.
4. Add your heroku url to ALLOWED_HOSTS.
Django-heroku
はホストに必要なくなりましたDjango herokuのアプリケーション。上記でDjango 2.2。