Version 1.1 by Leon Poon on 2018/12/24 10:02

Show last authors
1 == Download~[[[edit>>url:https://wiki.codepowered.com/w/index.php?title=How_to_Install_Python_3.6.5_in_Windows_and_Get_Pip_and_Virtualenv&action=edit&section=1]]] ==
2
3 Go to [[https:~~/~~/www.python.org/downloads/release/python-365/>>url:https://www.python.org/downloads/release/python-365/]].
4
5 Scroll down to the "Files" section.
6
7 Click on "Windows x86-64 executable installer". Download will start.
8
9
10 == Install~[[[edit>>url:https://wiki.codepowered.com/w/index.php?title=How_to_Install_Python_3.6.5_in_Windows_and_Get_Pip_and_Virtualenv&action=edit&section=2]]] ==
11
12 After download is complete, double click the package.
13
14 Ensure that you tick the checkbox that says "Add Python 3.6 to PATH". Complete the install.
15
16 To test that the installation works, open Command Prompt application and type and press enter:
17
18 {{code}}
19 python3
20 {{/code}}
21
22 If it shows this then you are OK:
23
24 {{code language="plain"}}
25 Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 05:52:31)
26 [MSC v.1900 64 bit (AMD64)] on win32
27 Type "help", "copyright", "credits" or "license" for more information.
28 >>>
29 {{/code}}
30
31 Press CTRL-Z and then press enter to exit python3.
32
33
34 == Install Pip~[[[edit>>url:https://wiki.codepowered.com/w/index.php?title=How_to_Install_Python_3.6.5_in_Windows_and_Get_Pip_and_Virtualenv&action=edit&section=3]]] ==
35
36 Open Command Prompt application.
37
38 type this and press enter:
39
40 {{code}}
41 pip3
42 {{/code}}
43
44
45 If you get the following output you are OK:
46
47 {{code language="plain"}}
48 Usage:
49 pip <command> [options]
50
51 Commands:
52 install Install packages.
53 download Download packages.
54 uninstall Uninstall packages.
55 freeze Output installed packages in requirements format.
56 list List installed packages.
57 show Show information about installed packages.
58 check Verify installed packages have compatible dependencies.
59 search Search PyPI for packages.
60 wheel Build wheels from your requirements.
61 hash Compute hashes of package archives.
62 completion A helper command used for command completion.
63 help Show help for commands.
64
65 General Options:
66 -h, --help Show help.
67 --isolated Run pip in an isolated mode, ignoring environment variables and user configuration.
68 -v, --verbose Give more output. Option is additive, and can be used up to 3 times.
69 -V, --version Show version and exit.
70 -q, --quiet Give less output. Option is additive, and can be used up to 3 times (corresponding to
71 WARNING, ERROR, and CRITICAL logging levels).
72 --log <path> Path to a verbose appending log.
73 --proxy <proxy> Specify a proxy in the form [user:passwd@]proxy.server:port.
74 --retries <retries> Maximum number of retries each connection should attempt (default 5 times).
75 --timeout <sec> Set the socket timeout (default 15 seconds).
76 --exists-action <action> Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup,
77 (a)bort.
78 --trusted-host <hostname> Mark this host as trusted, even though it does not have valid or any HTTPS.
79 --cert <path> Path to alternate CA bundle.
80 --client-cert <path> Path to SSL client certificate, a single file containing the private key and the
81 certificate in PEM format.
82 --cache-dir <dir> Store the cache data in <dir>.
83 --no-cache-dir Disable the cache.
84 --disable-pip-version-check
85 Don't periodically check PyPI to determine whether a new version of pip is available for
86 download. Implied with --no-index.
87 {{/code}}
88
89 == Install Virtual Env~[[[edit>>url:https://wiki.codepowered.com/w/index.php?title=How_to_Install_Python_3.6.5_in_Windows_and_Get_Pip_and_Virtualenv&action=edit&section=4]]] ==
90
91 Open Command Prompt application.
92
93 Type and press enter:
94
95 {{code}}
96 pip3 install virtualenv
97 {{/code}}
98
99
100 It should say something like:
101
102 {{code language="plain"}}
103 Collecting virtualenv
104 Downloading https://files.pythonhosted.org/packages/b6/30/96a02b2287098b23b875bc8c2f58071c35d2efe84f747b64d523721dc2b5/virtualenv-16.0.0-py2.py3-none-any.whl (1.9MB)
105 100% |████████████████████████████████| 1.9MB 765kB/s
106 Installing collected packages: virtualenv
107 Successfully installed virtualenv-16.0.0
108 {{/code}}
109
110 To check that it works, type in Command Prompt application and press enter:
111
112 {{code}}
113 virtualenv
114 {{/code}}
115
116
117 If it shows the following, you are OK.
118
119 {{code language="plain"}}
120 You must provide a DEST_DIR
121 Usage: virtualenv [OPTIONS] DEST_DIR
122
123 Options:
124 --version show program's version number and exit
125 -h, --help show this help message and exit
126 -v, --verbose Increase verbosity.
127 -q, --quiet Decrease verbosity.
128 -p PYTHON_EXE, --python=PYTHON_EXE
129 The Python interpreter to use, e.g.,
130 --python=python3.5 will use the python3.5 interpreter
131 to create the new environment. The default is the
132 interpreter that virtualenv was installed with (/Libra
133 ry/Frameworks/Python.framework/Versions/3.6/bin/python
134 3.6)
135 --clear Clear out the non-root install and start from scratch.
136 --no-site-packages DEPRECATED. Retained only for backward compatibility.
137 Not having access to global site-packages is now the
138 default behavior.
139 --system-site-packages
140 Give the virtual environment access to the global
141 site-packages.
142 --always-copy Always copy files rather than symlinking.
143 --relocatable Make an EXISTING virtualenv environment relocatable.
144 This fixes up scripts and makes all .pth files
145 relative.
146 --no-setuptools Do not install setuptools in the new virtualenv.
147 --no-pip Do not install pip in the new virtualenv.
148 --no-wheel Do not install wheel in the new virtualenv.
149 --extra-search-dir=DIR
150 Directory to look for setuptools/pip distributions in.
151 This option can be used multiple times.
152 --download Download preinstalled packages from PyPI.
153 --no-download, --never-download
154 Do not download preinstalled packages from PyPI.
155 --prompt=PROMPT Provides an alternative prompt prefix for this
156 environment.
157 --setuptools DEPRECATED. Retained only for backward compatibility.
158 This option has no effect.
159 --distribute DEPRECATED. Retained only for backward compatibility.
160 This option has no effect.
161 --unzip-setuptools DEPRECATED. Retained only for backward compatibility.
162 This option has no effect.
163 {{/code}}