-
Notifications
You must be signed in to change notification settings - Fork 41
/
0.setup_python.txt
58 lines (41 loc) · 1.58 KB
/
0.setup_python.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
1. instalasi
- python 3 => cek python di CMD: py -V atau python --version
- pycharm (jetbrains.com/pycharm)
IDE khusus python!
- VScode jg bisa, add Python extension & pilih intrepeter: python 3
- instal pylint linter (ctrl+shift+p -> python: select linter = pylint)
2. jalankan python di terminal
$ py namaFile.py
===============================================================================
install python via chocolatey:
1. install chocolatey (homebrew nya windows)
- run CMD sbg admin
- execute teks berikut:
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
- jika sudah, coba run di terminal manapun (termasuk di vscode):
$ choco
2. install python via choco
- $ choco install python
- $ python --version
Di VS code jangan lupa pilih intrepeter yg sesuai
CTRL + SHIFT + P -> Python: Select Interpreter
pilih Python 3 (yg sesuai)
3. update pip
- $ python -m pip install -U pip setuptools
====================================================================
Mac
sudo easy_install pip
sudo pip install --upgrade pip
https://evansdianga.com/install-pip-osx/
Win
pip --version
py -m pip -V
py -m pip install -U pip setuptools
python -m pip install -U pip setuptools
====================================================================
install package
1. $ pip
2. $ pip install matplotlib
3. $ pip install pandas
atau
4. $ py -m pip install namaPackages