###前提・実現したいこと
最終目標としてwordpress上でパイソンを動かしたいと思っています。
まずはpythonを動かすことを目標にしているのですが、そこでつまづいています。
半日つまづいてしまって、そろそろ心が折れそうです、、。
###発生している問題・エラーメッセージ
http://localhost:8888/python/main.py
上記URLにアクセスすると、下記内容がブラウザ上に表示されます。
Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, you@example.com and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log.
apache_error.logに表示されている内容です。
[Sat Jan 20 01:40:47 2018] [error] [client ::1] mod_wsgi (pid=66536): Target WSGI script '/Applications/MAMP/htdocs/python/main.py' does not contain WSGI application 'application'.
###該当のソースコード
python
1#!~/.pyenv/versions/3.6.4/bin/python3.6 2# coding: UTF-8 3 4print('お疲れ様です。') 5
###試したこと
・http://localhost:8888/python/main.pyに対してchmod +x main.pyで実行権限を変更
・apache_error.logの内容を元に、mod_wsgiモジュールをインストールしようとしましたが、エラーが表示されインストールできず。
$pip install mod_wsgi 実行
src/server/wsgi_python.h:24:10: fatal error: 'Python.h' file not found #include <Python.h> ^~~~~~~~~~ 1 error generated. error: command 'clang' failed with exit status 1
###補足情報(言語/FW/ツール等のバージョンなど)
OS : macOS High Sierra
MAMP PRO : version 4.2.1
python3.6.4
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。