Skip to content

Commit d5bf826

Browse files
add "Guide for install Package with Pipenv"
0 parents  commit d5bf826

2 files changed

Lines changed: 65 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.DS_Store
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Guide for install Package with Pipenv
2+
---
3+
4+
**Pre-Install**
5+
1. เครื่องต้องติดตั้ง python, pip, pipenv ก่อน
6+
- `python -m pip install`
7+
- `pip install pipenv`
8+
2. Create Folder Project
9+
10+
<br/>
11+
12+
**Setup Pipenv**
13+
1. พิมพ์คั่ง `pipenv install`
14+
2. พิมพ์คำสั่ง `pipenvshell`
15+
3. สังเกตว่าจะมีไฟล์ pipfile, pipfile.lock ขึ้นมาในโปรเจคของเรา
16+
17+
<br/>
18+
19+
20+
**Install Package**
21+
1. cd เข้าไปใน folder project
22+
2. พิมพ์คำสั่ง `pipenv shell`
23+
3. ให้สั่งเกตที่หน้า cursor ของ teminal จะมี () ชื่อโปรเจคของเรา
24+
4. พิมพ์คำสั่ง `pipenv install {packagename=version}`
25+
5. เมื่อโหลดเสร็จแล้ว จะมีชื่อ Package Django ขึ้นมาในไฟล์ Pipfile
26+
<br/>
27+
28+
29+
**Uninstall Package**
30+
1. cd เข้าไปใน folder project
31+
2. พิมพ์คำสั่ง `pipenv shell`
32+
3. พิมพ์คำสั่ง `pipenv uninstall {packagename=version}`
33+
<br/>
34+
35+
36+
**วิธีนำไปใช้งานกับเครื่องอื่น**
37+
1. cd เข้าไปใน folder project
38+
2. พิมพ์คำสั่ง `pipenv shell`
39+
3. พิมพ์คำสั่ง `pipenv install`
40+
4. ตัว pip จะไล่ติดตั้ง Package ที่ต้องใช้สำหรับโปจเจคเราโดยอัตโนมัติ
41+
<br/>
42+
43+
44+
> ***หากต้องการ ติดตั้ง Package อื่นเพิ่มเติม ก็ให้ทำเหมือนข้างต้น***
45+
> ***อย่าลืม active shell ก่อนทุกครั้ง `pipenv shell`***
46+
47+
48+
---
49+
50+
51+
> __pipenv__
52+
> > เป็นเครื่องมือ ที่ช่วยจัดการ python package dependency
53+
>
54+
> > มีการสร้าง virtualenv ให้อัตโนมัติ (เรียกง่ายคือ tool ของ pip ที่รวมการสร้าง env และ package management ไว้ในตัวเดียว)
55+
>
56+
> > ให้สนใจแค่ไฟล์ pipfile ถ้าเราต้องการเพิ่ม หรือ ปรับแต่งอะไร
57+
58+
<br/>
59+
60+
> __pipenv__
61+
>> __Pipenv__ is a tool that aims to bring the best of all packaging worlds (bundler, composer, npm, cargo, yarn, etc.) to the Python world. Windows is a first-class citizen, in our world.
62+
>>
63+
>> It automatically creates and manages a virtualenv for your projects, as well as adds/removes packages from your Pipfile as you install/uninstall packages. It also generates the ever-important Pipfile.lock, which is used to produce deterministic builds.
64+

0 commit comments

Comments
 (0)