NameError: name 'hasattr' is not defined - Python3.6, Django1.11, Ubuntu16-17, Apache2.4, mod_wsgi

前端 未结 3 1360
猫巷女王i
猫巷女王i 2021-01-12 10:54

I\'ve set up my Python/Django virtual environment, and mod_wsgi in daemon mode, and am pretty sure (done this before) it\'s \"mostly correct\" except I get the fol

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-12 11:28

    Try uninstalling PIL completely, and then reinstall Pillow package.

    Actually there is conflict in PIL old package and Pillow package which is in conflict with newer versions of django.

    You need to install the new Pillow package.

    First Uninstall both

    sudo pip3 uninstall pil
    sudo pip3 uninstall pillow
    

    Reinstall Pillow

    sudo pip3 install pillow
    

提交回复
热议问题