Until now, I started a docker environment on mac and learned Django, but I thought that it might be a study of aws after seeing the article done on cloud9, so I tried cloud9. However, I made a note because it took a long time to resolve the error caused by executing manage.py before writing the code.
Environment: aws cloud9 amazon linux2
/etc/system-release
$ cat /etc/system-release
Amazon Linux release 2 (Karoo)
$ python manage.py startapp blog
Traceback (most recent call last):
File "manage.py", line 21, in <module>
... abbreviation ...
raise ImproperlyConfigured('SQLite 3.8.3 or later is required (found %s).' % Database.sqlite_version)
django.core.exceptions.ImproperlyConfigured: SQLite 3.8.3 or later is required (found 3.7.17)
$ python -V
Python 3.7.9
$ sqlite3 --version
3.33.0 2020-08-14 13:23:32
The version doesn't seem to matter.
$ which sqlite3
/home/linuxbrew/.linuxbrew/bin/sqlite3
$ /usr/bin/sqlite3 --version
3.7.17 2013-05-20 00:56:22
You can see sqlite3 under linuxbrew from the command line, but can you see / usr / bin / sqlite3 from python? When I checked, there were many articles to install the latest version because sqlite3 is old, but there was an article that sets the lib of the latest version installation destination to LD_LIBRARY_PATH, so I tried to imitate it.
export LD_LIBRARY_PATH=/home/linuxbrew/.linuxbrew/lib:${LD_LIBRARY_PATH}
You have successfully executed manage.py. I didn't know linuxbrew, but the linux version of homebrew .. There was an article that I found that it would be good to set LD_LIBRARY_PATH as well, but it seems that linuxbrew is installed in cloud9 but LD_LIBRARY_PATH is not set (there was no description in .bashrc).
\ ### I somehow understand that I have to set LD_LIBLARY_PATH, but I'm not sure why it is necessary.
reference https://qiita.com/rururu_kenken/items/8202b30b50e3bfa75821 https://qiita.com/thermes/items/926b478ff6e3758ecfea
Recommended Posts