Since PythonMagick is not available through PIP package manager, how can I install PythonMagick on Amazon Elastic Beanstalk?
1 Answers
To install Python packages on Amazon Beanstalk, you have to run add a command in our .ebextension/*.config file. Amazon Linux AMIs in Beanstalk are not shipped with pip but easy_install.
These commands run before the application and web server are set up and the application version file is extracted.
commands:
01_install_pythonmagick:
command: 'easy_install PythonMagick'
or You can install it with the Debian package manager:
commands:
install_packages:
command: sudo apt-get install python-pythonmagick [Debian]*
or in Ubuntu:
command: sudo yum install python-pythonmagick [Ubuntu]
By other hand, the config files must be part of an .ebextensions directory added to your project sources.
When deploying your code using the eb create / eb deploy command line, these commands are using the git archive commands to package your code and upload it to Elastic Beanstalk for deployment
When your .ebextensions is not under git control (like being in .gitignore) for example, the directory and its config files are not packaged and not sent to Elastic Beanstalk.
Be sure that you add and commit .ebextensions directory before tod deploy to Elastic Beanstalk.

- 21
- 5