[PYTHON] mod_wsgi talks about putting it in with pip

I was (or intended) writing python correctly

But one day suddenly ImportError: cannot import name parse e? e? ʻUrllibisn't the one you can put in withpip`, right? ... Yeah, it wasn't.

I thought maybe sys.version_info Output sys.version_info(major=2, minor=7, micro=11, releaselevel='final', serial=0) This is this!

Unknown cause?

To be honest, I don't know what it means, so I'll do a lot of research, but I still don't know the cause. python -V Even if you do Python 3.5.1 sites-package is also working well.

However, I notice that it is here and there.

I used python2 when I built wsgi

It's a matter of course. of course it is. I'm building with python2 so it works with python2.

But I couldn't build wsgi with python3

If you put the whole error here, it will be quite a lot, so I will omit it, but well, I could not build it anyway. I think it was an error related to apxs. (In the first place, when I did it before, it didn't work in 3 and I built it in 2, so I haven't investigated it very deeply this time. I can do it normally! Please let me know if you have any information)

I mean, I didn't really have to build it myself in the first place

Who said that people are creatures that are forgotten? Especially since I am a creature that is easy to forget, I want to be careful in the future. Yes, we have pip.

pip install mod_wsgi
LoadModule wsgi_module /Users/name/.pyenv/versions/3.5.1/lib/python3.5/site-packages/mod_wsgi/server/mod_wsgi-py35.cpython-35m-darwin.so

To put it very simply, it worked. I think it's too salty, but it worked, so I have no choice but to write it like this. **moved. ** **

By the way, I also tried brew, but it didn't work.

brew install mod_wsgi3
LoadModule wsgi_module /usr/local/Cellar/mod_wsgi3/3.5/libexec/mod_wsgi.so

I used to complain that this was python3 when using a brew doctor or something, so I feel like I set brew to work based on python2 (I'm sure, but for what reason and how). Wasletesimatta), so I think that is the cause. Probably, if it is solved, mod_wsgi put in with brew will work normally.

As mentioned above, Qiita's editor is unexpectedly easy to use and it has become a blog-like writing style, but I just hope that this article will be useful to someone.

Recommended Posts

mod_wsgi talks about putting it in with pip
About package management with conda and pip
Put TensorFlow in P2 instance with pip3
Package management in Maya-try putting pip in mayapy
About pip
Start Caddy with docker without putting Caddy in CentOS8
Start Nginx with docker without putting Nginx in CentOS8
The story that fits in with pip installation
Notes about with
Start numerical calculation in Python (with Homebrew and pip)
Until you install TensorFlow-GPU with pip in Windows environment
Install tweepy with pip and use it for API 1.1