1
1

More than 1 year has passed since last update.

mod_wsgiをpipでインストール

Last updated at Posted at 2022-03-02

はじめに

flaskをapacheで動かしたいと思ったのですが、
mod_wsgiのインストールに手間取ったのでメモ。

本題

「適切なバージョンのwhlファイルをダウンロードしてインストールする」
という情報が多かったですが、自分の環境に合ったwhlファイルが無かったので、
pipでインストールできないか試してみました。

pip install mod_wsgi

エラー
RuntimeError: No Apache installation can be found. Set the MOD_WSGI_APACHE_ROOTDIR environment to its location.
Apacheのインストールが見当たりません。
MOD_WSGI_APACHE_ROOTDIRに場所を設定してください。との事。

set "MOD_WSGI_APACHE_ROOTDIR=C:\xampp\apache"

でapacheの場所を設定します。


もう一度インストール。

pip install mod_wsgi

またエラー
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
Microsoft Visual C++ 14.0 が必要です。
Microsoft Visual C++ Build Tools "で入手してください。との事

下記などからダウンロードしてインストールします。
https://visualstudio.microsoft.com/ja/downloads/


もう一度インストール。

pip install mod_wsgi

これでインストール完了です。
ありがとうございます。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1