uWSGI Fails with No module named encoding Error

后端 未结 9 1770
花落未央
花落未央 2021-01-17 07:58

I am trying to setup uWSGI with Pyramid, but I am getting this error, when attempting uwsgi --ini-paste development.ini

Python version: 3.2.3

相关标签:
9条回答
  • 2021-01-17 08:16

    I also met this problem today, and I tried to set plugins=python34, but it did not work on Ubuntu 14.04 and Python 3.4.3

    This is what I did to fix it:

    1. sudo pip uninstall uwsgi

    2. something goes wrong when i run sudo pip install uwsgi, and run this first:

      sudo apt-get install python-dev

    3. (sudo)pip install uwsgi

    0 讨论(0)
  • 2021-01-17 08:16

    I had similar problem. In my case, the problem was in uid, guid params of uwsgi.ini. www-data user didn't have a permission to run python in virtualenv.

    0 讨论(0)
  • 2021-01-17 08:18

    in my case it was basically because I used python 2.7 as main interpreter, and uwsgi choose pyhon3 plugin. You might need to force it using:

    plugins=python32

    where python32is appropriate name for your pythhon3 plugin.

    Have you checked this: uwsgi python3 plugin doesn't work?

    0 讨论(0)
  • 2021-01-17 08:21

    I encountered a similar error message, but with a python version variation:

    Python version: 3.4.3 (default, Nov 28 2017, 16:44:58)  [GCC 4.8.4]
    

    This came about from trying to use a python3.6 virtual environment, but uwsgi being setup for python3.4. I re-setup the virtual environment using python3.4 and all was well.

    0 讨论(0)
  • 2021-01-17 08:23

    Just had the same problem. What I realized afterwards was that I installed uwsgi with pip install uwsgi in the virtualenv. Once I left the virtualenv, I installed uwsgi on the local system with pip3 install uwsgi (notice I wrote pip instead of pip3). So I uninstalled with pip3 uninstall uwsgi and I repeated with pip install uwsgi. Worked like a Charm.

    0 讨论(0)
  • 2021-01-17 08:23

    Check the path of virtualenv. Make sure you are not using something like this: ~/.virtualenvs/xxx.

    The ~ symbol points to the home directory of a user. So with different users, this path will refer to different positions.

    If you are not very assured, please move the virtualenv to places like /home/.virtualenvs.

    0 讨论(0)
提交回复
热议问题