ํจํค์ง๋ Pipfile( pipenv install
)์์ ์ค์นํ๋ ๋ฐ ์คํจํ์ง๋ง ์ด๋ฆ์ ์ง์ ํ ํ ์ค์น์ ์ฑ๊ณตํ์ต๋๋ค.
ํจํค์ง๊ฐ ์ค์น๋ฉ๋๋ค.
ํด์๊ฐ ์ผ์นํ์ง ์์ผ๋ฉด ์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค. ํจํค์ง ์ด๋ฆ์ด ์ง์ ๋๋ฉด ์ค์น๋๊ณ "์ด๋ฏธ ์ค์น๋์ด ์์ผ๋ฏ๋ก ํด์๋ฅผ ํ์ธํ์ง ์๊ณ ์ด ํจํค์ง๋ฅผ ์ ๋ขฐํฉ๋๋ค."๋ผ๊ณ ํ์๋ฉ๋๋ค.
์ฅํฉํ์ง ์์
์์ธํ ์ถ๋ ฅ:
> pipenv install numpy --verbose
Creating a virtualenv for this project...
Pipfile: /home/pi/testing_dir/Pipfile
Using /usr/bin/python3.5m (3.5.3) to create virtualenv...
โ Running virtualenv with interpreter /usr/bin/python3.5m
Using base prefix '/usr'
New python executable in /home/pi/.local/share/virtualenvs/testing_dir-WDGBnYYm/bin/python3.5m
Also creating executable in /home/pi/.local/share/virtualenvs/testing_dir-WDGBnYYm/bin/python
Installing setuptools, pip, wheel...done.
Setting project for testing_dir-WDGBnYYm to /home/pi/testing_dir
Virtualenv location: /home/pi/.local/share/virtualenvs/testing_dir-WDGBnYYm
Installing numpy...
โ Installing 'numpy'
$ "/home/pi/.local/share/virtualenvs/testing_dir-WDGBnYYm/bin/pip" install --verbose "numpy" -i https://pypi.org/simple --exists-action w
[ snip ]
Installing collected packages: numpy
Successfully installed numpy-1.14.5
Cleaning up...
Adding numpy to Pipfile's [packages]...
Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
using sources: [{'name': 'pypi', 'url': 'https://pypi.org/simple', 'verify_ssl': True}]
Using pip: -i https://pypi.org/simple
ROUND 1
Current constraints:
numpy (from -r /tmp/pipenv-fw9u0ln7-requirements/pipenv-c8uwffst-constraints.txt (line 2))
Finding the best candidates:
found candidate numpy==1.14.5 (constraint was <any>)
Finding secondary dependencies:
numpy==1.14.5 requires numpy==1.14.5; python_version != "3.1.*" and python_version != "3.0.*" and python_version != "3.3.*" and python_version != "3.2.*" and python_version >= "2.7"
New dependencies found in this round:
adding ['numpy', '==1.14.5', '[]']
Removed dependencies in this round:
Unsafe dependencies in this round:
------------------------------------------------------------
Result of round 1: not stable
ROUND 2
Current constraints:
numpy==1.14.5 (from -r /tmp/pipenv-fw9u0ln7-requirements/pipenv-c8uwffst-constraints.txt (line 2))
Finding the best candidates:
found candidate numpy==1.14.5 (constraint was ==1.14.5)
Finding secondary dependencies:
numpy==1.14.5 requires numpy==1.14.5; python_version != "3.1.*" and python_version != "3.0.*" and python_version != "3.3.*" and python_version != "3.2.*" and python_version >= "2.7"
------------------------------------------------------------
Result of round 2: stable, done
Updated Pipfile.lock (5a67c1)!
Installing dependencies from Pipfile.lock (5a67c1)...
Installing 'numpy==1.14.5 --hash=sha256:07379fe0b450f6fd6e5934a9bc015025bb4ce1c8fbed3ca8bef29328b1bc9570 [long list of hashes]'
$ "/home/pi/.local/share/virtualenvs/testing_dir-WDGBnYYm/bin/pip" install --verbose --no-deps -r "/tmp/pipenv-m7n5vxhw-requirements/pipenv-s6f0at97-requirement.txt" --require-hashes -i https://pypi.org/simple --exists-action w
Created temporary directory: /tmp/pip-ephem-wheel-cache-ntah_q6a
Created temporary directory: /tmp/pip-install-75w412mp
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: numpy==1.14.5 in /home/pi/.local/share/virtualenvs/testing_dir-WDGBnYYm/lib/python3.5/site-packages (from -r /tmp/pipenv-m7n5vxhw-requirements/pipenv-s6f0at97-requirement.txt (line 1)) (1.14.5)
Since it is already installed, we are trusting this package without checking its hash. To ensure a completely repeatable environment, install into an empty virtualenv.
Cleaning up...
๋ผ์ฆ๋ฒ ๋ฆฌ ํ์ด๋ฅผ ์ฌ์ฉํ๊ณ ์์ต๋๋ค. ์ฆ, x86 ์์คํ ์์ ์ ๊ธ ํ์ผ์ ์ฌ์ฉํ ์ ์์ต๋๋ค. ์ ๊ธ ํ์ผ์ ์ด๋ป๊ฒ ๊ตฌ์ถํ์ต๋๊น?
๊ทํ์ ๊ฒฝ์ฐ pipfile์ ์ถ๊ฐ ์์ค๋ฅผ ์ถ๊ฐํด์ผ ํฉ๋๋ค.
[[source]]
url = "https://pypi.org/simple"
name = "pypi"
verify_ssl = true
[[source]]
url = "https://www.piwheels.org/simole"
name = "piwheels"
verify_ssl = true
[packages]
numpy = {version = "*", index = "piwheels"}
[dev-packages]
[requires]
python_version = "3.5"
๋ฌธ์ ๊ฐ ๊ณ์๋๋ฉด ๋ฌธ์ ํ ํ๋ฆฟ์ ์์ฑํ์ญ์์ค. ์๋ชป๋๊ณ ์๋ ๊ฒ์ ๋ฐ๊ฒฌํ๋ ์ฐ๋ฆฌ์ ๋ฅ๋ ฅ์ ํฉ๋ฆฌํํ๊ธฐ ์ํด ์กด์ฌํฉ๋๋ค. ๋ณด๊ณ ์์ ๊ฐ์ฌ๋๋ฆฌ๋ฉฐ ๋์์ด ๋๊ธฐ๋ฅผ ๋ฐ๋๋๋ค.
ํด๋์ ์ ๊ธ ํ์ผ์ด ์์์ต๋๋ค. ๊ทธ๋ฌ๋ piwheels ์์ค๋ฅผ ์ถ๊ฐํ๋ฉด ์๋ํฉ๋๋ค. ๊ฐ์ฌํฉ๋๋ค!
@techalchemy pinwheels
์์ค๋ฅผ ์ถ๊ฐํด๋ ๋ด๊ฐ ๊ฒช๊ณ ์๋ ๊ฒ๊ณผ ๋์ผํ ๋ฌธ์ ๊ฐ ํด๊ฒฐ๋์์ต๋๋ค. ์ถ๊ฐ ์์ค๊ฐ ํ์ํ ์ด์ ์ ๋ํ ๋ฌธ์๊ฐ ์์ต๋๊น? pipenv lock
์ฒ์ ์คํํ ๋ ์๋์ผ๋ก ํฌํจ๋์ง ์๋ ์ด์ ๊ฐ ๊ถ๊ธํฉ๋๋ค.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
@techalchemy
pinwheels
์์ค๋ฅผ ์ถ๊ฐํด๋ ๋ด๊ฐ ๊ฒช๊ณ ์๋ ๊ฒ๊ณผ ๋์ผํ ๋ฌธ์ ๊ฐ ํด๊ฒฐ๋์์ต๋๋ค. ์ถ๊ฐ ์์ค๊ฐ ํ์ํ ์ด์ ์ ๋ํ ๋ฌธ์๊ฐ ์์ต๋๊น?pipenv lock
์ฒ์ ์คํํ ๋ ์๋์ผ๋ก ํฌํจ๋์ง ์๋ ์ด์ ๊ฐ ๊ถ๊ธํฉ๋๋ค.