[Django] sqlite version error when running python manage.py in aws cloud9 environment

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

[Django] sqlite version error when running python manage.py in aws cloud9 environment
Django2.2 SQLite3 version error
Try running python in a Django environment created with pipenv
Error when building mac python environment
[AWS] Problem avoidance memo when installing awscli and boto3 in Python 2.7 environment
[Django] Error when SlugField is specified in .filter ()
Display error message when login fails in Django
Sqlite in python
[Python] What to check when you get a Unicode Decode Error in Django
Error when trying to install psycopg2 in Python
Error running Jupyter Notebook in Anaconda virtual environment
Use pydantic when reading environment variables in Python
I tried running TensorFlow in AWS Lambda environment: Preparation
What's in that variable (when running a Python script)
When you get an error in python scraping (requests)
Explanation of NoReverseMatch error in "python django super introduction"
virtual environment in python
Development environment in Python
A Python script that lists execution history in an environment running many AWS Glue Jobs
What to do if you get an error when running "certbot renew" in CakePHP environment
CSRF validation error when accessing django 3.0 admin page in Chrome
[Django3] Display a web page in Django3 + WSL + Python virtual environment
[GCP] A memorandum when running a Python program on Cloud Functions
[Python] Scraping in AWS Lambda
Handle environment variables in Python
Specify options when running python
Attention when os.mkdir in Python
Error when playing with python
Slice error in python (´ ; ω ; `)
(Note) Django in Vagrant environment
Wrapper running Hadoop in Python
Error resolution python version check
Resolved an error when putting pygame in python3 on raspberry pi
# 3 Build a Python (Django) environment on AWS EC2 instance (ubuntu18.04) part2
Things to note when running Python on EC2 from AWS Lambda
When creating an environment that uses python django on Ubuntu 12.04 LTS
Install pip in Serverless Framework and AWS Lambda with Python environment
Error in ordinal number when importing Numpy in Anaconda environment of Windows
I get an error when I put a Python plugin in Visual Studio Code under the pyenv environment