Getting peewee to work on elastic beanstalk

后端 未结 1 717
遇见更好的自我
遇见更好的自我 2021-01-24 17:57

I\'m trying to install the peewee package on an elastic beanstalk instance to control a bottle application. I think the problem is with the MySQL-python dependency, but peewee d

1条回答
  •  南方客
    南方客 (楼主)
    2021-01-24 18:41

    Sorry I forgot I asked this. I eventually solved this issue by ssh'ing into the instance and installing MySQL-Python using easy_install instead of pip.

    Basically I went to the python virtual environment direction at:

    opt/python/run/venv/bin

    and installed version 1.2.3 using easy_install:

    sudo ./easy_install MySQL-Python==1.2.3

    I checked to see it was installed by trying to import MySQLdb in the virtual environment's python:

    ./python
    
    >>>import MySQLdb
    >>>
    

    and it worked for me. Then I reset the server by pushing to it again with the elastic beanstalk command line tool:

    git aws.push

    and that's about it. Somewhat annoying to have to do it, but it seems to continue to work when a new instance is started up.

    Thanks, Alex

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