I was able to fix this problem by starting gunicorn using python3 env/bin/gunicorn instead of env/bin/gunicorn. The cryptic error message was when Ubuntu would tell me that env/bin/gunicorn didn't exist as opposed to saying /codebuild/output/src715682316/src/env/bin/python didn't exist. To be more specific, all of the files in env/bin had the shebang #!/codebuild/output/src715682316/src/env/bin/python, so of course running env/bin/gunicorn on the production server would fail. The mkdir command stands for 'make directory' and will create a new directory in the directory you are currently located within on the terminal. Create directory foo with the mkdir command. Open your terminal and execute the following commands. In my case, the machine installing the packages and actually running the packages was different. We can add some text data to the file so that it is not empty. It was just Python scripts with a shebang of the path to the Python interpreter on the build machine. contained actual binaries of native libraries but that was not the case. I was using AWS CodeBuild to build the virtual environment and run tests and using CodeDeploy to put the built artifacts onto the production server and launch the new version (all environments were Ubuntu 20.04). For future readers, I had this issue when trying to launch a Django server using gunicorn.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |