μ΄κ²μ λ°λͺ¨ νλ‘μ νΈμ κ²½μ°μλ λ¬Έμ λΉλλ₯Ό νΈλ¦¬κ±°νλ €κ³ ν λ λ°μν©λλ€. Ubuntu 18.04μ Amazon Linux 2 λͺ¨λμ μλ‘ μ€μΉν λ μ΄ μμ μ μννμ΅λλ€.
λ΄ Ubuntu μ€ν¬λ¦½νΈ:
apt update
apt upgrade -y
apt install -y latexmk texlive texlive-science texlive-formats-extra git redis python3-dev
git clone https://github.com/rtfd/readthedocs.org.git
cd readthedocs.org
echo " SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')" >> readthedocs/settings/base.py
python3 -m venv --without-pip venv
source venv/bin/activate
curl -s https://bootstrap.pypa.io/get-pip.py | python
pip install -r requirements.txt
pip install django-allauth
python manage.py migrate
echo "from django.contrib.auth.models import User; User.objects.create_superuser('admin', 'admin<strong i="8">@localhost</strong>', 'admin')" | python ./manage.py shell
python manage.py collectstatic
python manage.py loaddata test_data
python manage.py runserver 0.0.0.0:8000
μ€λ₯:
[21/Feb/2019 19:22:26] readthedocs.doc_builder.environments:599[1832]: WARNING (Build) [admin-demo:latest] Command python3.7 -mvirtualenv --no-site-packages --no-download /home/ubuntu/readthedocs.org/user_builds/admin-demo/envs/latest failed:
Traceback (most recent call last):
File "/home/ubuntu/readthedocs.org/readthedocs/doc_builder/environments.py", line 178, in run
env=environment,
File "/usr/lib/python3.6/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'python3.7': 'python3.7'
Traceback (most recent call last):
File "/home/ubuntu/readthedocs.org/readthedocs/projects/tasks.py", line 558, in run_build
self.setup_python_environment()
File "/home/ubuntu/readthedocs.org/readthedocs/projects/tasks.py", line 784, in setup_python_environment
self.python_env.setup_base()
File "/home/ubuntu/readthedocs.org/readthedocs/doc_builder/python_environments.py", line 258, in setup_base
cwd='$HOME',
File "/home/ubuntu/readthedocs.org/readthedocs/doc_builder/environments.py", line 612, in run
return super().run(*cmd, **kwargs)
File "/home/ubuntu/readthedocs.org/readthedocs/doc_builder/environments.py", line 403, in run
return self.run_command_class(cls=self.command_class, cmd=cmd, **kwargs)
File "/home/ubuntu/readthedocs.org/readthedocs/doc_builder/environments.py", line 618, in run_command_class
return super().run_command_class(*cmd, **kwargs)
File "/home/ubuntu/readthedocs.org/readthedocs/doc_builder/environments.py", line 472, in run_command_class
raise BuildEnvironmentWarning(msg)
readthedocs.doc_builder.exceptions.BuildEnvironmentWarning: Command python3.7 -mvirtualenv --no-site-packages --no-download /home/ubuntu/readthedocs.org/user_builds/admin-demo/envs/latest failed:
Traceback (most recent call last):
File "/home/ubuntu/readthedocs.org/readthedocs/doc_builder/environments.py", line 178, in run
env=environment,
File "/usr/lib/python3.6/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'python3.7': 'python3.7'
λ¬Έμ λΉλ
Python 3.7 λλ½ μ€λ₯
μ΄κ²μ λμΌν μ€μ μ€ν¬λ¦½νΈλ₯Ό μ¬μ©νμ¬ μ΄κ²μ μλνμ λ λ©°μΉ μ μ λ°μνμ§ μμμ΅λλ€.
λ¬Έμ μμ±μ μ ν리μΌμ΄μ κ³Ό λ³κ°μ λλ€. μ΅μ 릴리μ€μμλ κΈ°λ³Έμ μΌλ‘ 3.7λ‘ μ€μ λμ΄ μμ΅λλ€. κ΅¬μ± νμΌμ μ¬μ©νμ¬ λ€λ₯Έ Python λ²μ μ μ¬μ©νκ±°λ readthedocs/settingsμμ κΈ°λ³Έ μ€μ μ λ³κ²½ν μ μμ΅λλ€.
μ΄ μμ μ μννλ λ°©λ²μ μ€λͺ νμμμ€. λ¬Έμνλμ΄ μμ΅λκΉ?
κ΅¬μ± νμΌ μ¬μ© https://docs.readthedocs.io/en/stable/config-file/v2.html
λλ μ€μ μμ 3.7μ μ κ±°ν μ μμ΅λλ€. https://github.com/rtfd/readthedocs.org/blob/ed8dd29a68d009fc08929fabf7155883482619c1/readthedocs/settings/base.py#L292 -L294(μ΅μ λ²μ μμ μ΄λ―Έμ§λ₯Ό μ¬μ©νκΈ° λλ¬Έμ)
κ·Έλ¦¬κ³ μ°λ¦¬λ νλ‘λμ μμ λ컀λ₯Ό μ¬μ©ν©λλ€.
μ΄κ²μ μ ν리μΌμ΄μ μ€νμ μν΄ Python 3.7μ μ§μνμ§ μλλ€λ μ μ κ³ λ €ν λ μ΄μν μνλ‘ λ³΄μ λλ€(#4756).
κΈ°λ³Έμ μΌλ‘ λ κ°μ§ λ²μ μ Pythonμ΄ νμν μ΄μ λ 무μμ λκΉ? μ΄λ κΈ°λ³Έ λμμ μννκΈ°μ μ’μ μνκ° μλλλ€.
κ°μ₯ μ μ©ν λκΈ
μ΄κ²μ μ ν리μΌμ΄μ μ€νμ μν΄ Python 3.7μ μ§μνμ§ μλλ€λ μ μ κ³ λ €ν λ μ΄μν μνλ‘ λ³΄μ λλ€(#4756).
κΈ°λ³Έμ μΌλ‘ λ κ°μ§ λ²μ μ Pythonμ΄ νμν μ΄μ λ 무μμ λκΉ? μ΄λ κΈ°λ³Έ λμμ μννκΈ°μ μ’μ μνκ° μλλλ€.