νκ²½
μ΄κ²μ docker run python:3
μ¬μ©νμ¬ μ¬νλμμ΅λλ€.
μ€λͺ
μ μ½ μ‘°κ±΄ νμΌμ΄ νΈνλμ§ μλ λ²μ μ μ§μ νλ κ²½μ° pipλ μ’
μμ±μ΄ μμλ ν¨ν€μ§λ₯Ό μ€μΉν©λλ€. μ€λ₯ λ©μμ§κ° νμλμ§λ§ μ’
λ£ μ½λλ 0
μ
λλ€.
μλ₯Ό λ€μ΄ environs 5.2.1
μλ marshmallow>=2.7.0
κ° νμνμ§λ§ νμκ° μ μ½ μ‘°κ±΄ νμΌμ μ§μ λ κ²½μ° pipλ marshmallow 2.6.0
μ ν¨κ» μ€μΉν©λλ€.
μμλλ νλ
pipλ ν¨ν€μ§λ₯Ό μ€μΉνμ§ μμμΌ νλ©° μ€ν¨λ‘ μ’ λ£λ©λλ€.
λ²μ λ°©λ²
marshmallow==2.6.0
constraint.txt μμ±environs==5.2.1
requirements.txt μμ±pip install -r requirements.txt -c constraints.txt
μ°μΆ
$ docker run --rm -ti python:3 sh
# python -V
Python 3.7.4
# pip -V
pip 19.2.3 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)
# uname -a
Linux 4d4f16cc965f 4.9.184-linuxkit #1 SMP Tue Jul 2 22:58:16 UTC 2019 x86_64 GNU/Linux
# echo marshmallow==2.6.0 > constraints.txt
# echo environs==5.2.1 > requirements.txt
# pip install -r requirements.txt -c constraints.txt
Collecting environs==5.2.1 (from -r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/5f/c9/6b576b8b374dfe78d9435988e6a53497822f31b9da5bdd446343ad1a4d1b/environs-5.2.1-py2.py3-none-any.whl
Collecting marshmallow==2.6.0 (from -c constraints.txt (line 1))
Downloading https://files.pythonhosted.org/packages/33/44/c3bdd4222909b6452ebe5c028ea5dbe7e9409307b3b933026218c677fcf1/marshmallow-2.6.0-py2.py3-none-any.whl (44kB)
|ββββββββββββββββββββββββββββββββ| 51kB 729kB/s
Collecting python-dotenv (from environs==5.2.1->-r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/57/c8/5b14d5cffe7bb06bedf9d66c4562bf90330d3d35e7f0266928c370d9dd6d/python_dotenv-0.10.3-py2.py3-none-any.whl
ERROR: environs 5.2.1 has requirement marshmallow>=2.7.0, but you'll have marshmallow 2.6.0 which is incompatible.
Installing collected packages: marshmallow, python-dotenv, environs
Successfully installed environs-5.2.1 marshmallow-2.6.0 python-dotenv-0.10.3
# echo $?
0
μ΄κ²μ λ³Έμ§μ μΌλ‘ #988κ³Ό λμΌν©λλ€(μ°Έμ‘°: #5137).
Pipμ μ²μ μ νλ κΈ°μ€μΌλ‘ μꡬ μ¬νμ νμ
ν©λλ€(μκ³ μμ΄ λ³κ²½λ μ μμ). μꡬ μ¬ν νμΌκ³Ό μ μ½ μ‘°κ±΄ νμΌμ΄ ꡬ문 λΆμλλ©΄ environs==5.2.1
κ° μꡬ μ¬νμΌλ‘, marshmallow==2.6.0
κ° μ μ½ μ‘°κ±΄μΌλ‘ νμλ©λλ€. environs
κ° μ²λ¦¬ μ€μΌ λ marshmallow
κ° μ’
μμ±μΌλ‘ μΈμλκ³ κΈ°μ‘΄ νλͺ©( marshmallow==2.6.0
)μ΄ μꡬ μ¬νμΌλ‘ νμλκ³ κΈ°μ‘΄ λ²μ μ΄ μ€μΉμ μ¬μ©λλ λ²μ μ
λλ€. . μ¬μ©μκ° μ 곡ν κ°μ μ¬μ©νλ κ²μ΄ (λ¨μν μ μ½ μ‘°κ±΄μΌμ§λΌλ) μ¬κΈ°μμ μ°λ¦¬κ° ν μ μλ κ°μ₯ μ¬λ°λ₯Έ λμμ΄λΌκ³ μκ°ν©λλ€.
μΆμ λλ μ€λ₯λ μΌλ° pip install environs==5.2.1 marshmallow==2.6.0
λλ pip install environs==5.2.1 && pip install marshmallow==2.6.0
μ κ°μ κ°λ³ νΈμΆμ λν΄ μΆμ λλ κ²κ³Ό λμΌν©λλ€.
μ΄κ²μ #5000μ μΆκ°λμμ΅λλ€. μ’ λ£ μ½λκ° 1μ΄ μλ μ΄μ λ μ΄μ λ²μ κ³Όμ νΈνμ± λλ¬Έμ λλ€.
μ΄κ²μ΄ μΌμ΄λκ³ μλ€λ κ²μ νλ‘κ·Έλλ° λ°©μμΌλ‘ μκ³ μΆλ€λ©΄ pip check
λ₯Ό μ€ννκ³ μΆμ΅λλ€.
μ΄ νΈλ μμ μμ μΆκ° μ 보 μμ²μ λν μλ΅μ΄ μμκΈ° λλ¬Έμ μλμΌλ‘ μ’ λ£λμμ΅λλ€. νμ¬ λ¬Έμ μ μλ μ 보λ§μΌλ‘λ μ‘°μΉλ₯Ό μ·¨νκΈ°μ μΆ©λΆν μ λ³΄κ° μμ΅λλ€. λ μ‘°μ¬ν μ μλλ‘ νμν λ΅λ³μ΄ μκ±°λ μ°ΎμΌλ©΄ μ°λ½ν΄ μ£Όμμμ€.