LoginSignup
1

More than 5 years have passed since last update.

responder1.2.0でのstarlette依存関係について【2019/02/20現在】

Last updated at Posted at 2019-02-19

responder勉強2日目です。
responder1.2.0の環境構築の際に日本語での情報が古くてつまづいたので、最新版のメモです。

環境

python3.7.2
responder==1.2.0

旧情報

requirements.txt
starlette==0.8

いくつかのページでも載っていましたが、こちらのバージョンでは動きません。
以下のようなエラーが出ます。

ModuleNotFoundError: No module named 'starlette.middleware.lifespan'

このエラーは以前までのものと微妙に違います。
以前は下のようなエラーでした。

ModuleNotFoundError: No module named 'starlette.lifespan'

解決策

requirements.txt
starlette==0.10

正しくは、こちらになります。

補足

なお、starletteのバージョンは、すでに0.11がリリースされていて、
また、構成が変わっているので最新版でも動きません。

参考ページ

https://github.com/kennethreitz/responder
https://github.com/kennethreitz/responder/commit/49114f36ce2c19fa10fd9a7a37230459a9ba4da7

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