You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -156,7 +156,7 @@ Python (on Visual Studio Code)
156
156
------------------------------
157
157
158
158
`Python for Visual Studio <https://marketplace.visualstudio.com/items?itemName=ms-python.python>`_ is an extension for the `Visual Studio Code IDE <https://code.visualstudio.com>`_.
159
-
This is a free, light weight, open source IDE, with support for Mac, Windows, and Linux.
159
+
This is a free, lightweight, open source IDE, with support for Mac, Windows, and Linux.
160
160
Built using open source technologies such as Node.js and Python, with compelling features such as Intellisense (autocompletion), local and remote debugging, linting, and the like.
161
161
162
162
MIT licensed.
@@ -192,15 +192,15 @@ toward working with scientific Python libraries (namely
192
192
`pylint <http://www.logilab.org/857>`_ and
193
193
`rope <https://github.com/python-rope/rope>`_.
194
194
195
-
Spyder is open-source (free), offers code completion, syntax highlighting,
195
+
Spyder is opensource (free), offers code completion, syntax highlighting,
196
196
a class and function browser, and object inspection.
197
197
198
198
199
199
WingIDE
200
200
-------
201
201
202
202
`WingIDE <http://wingware.com/>`_ is a Python specific IDE. It runs on Linux,
203
-
Windows and Mac (as an X11 application, which frustrates some Mac users).
203
+
Windows, and Mac (as an X11 application, which frustrates some Mac users).
Copy file name to clipboardExpand all lines: docs/dev/virtualenvs.rst
+28-14Lines changed: 28 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -212,7 +212,7 @@ Install virtualenv via pip:
212
212
213
213
$ pip install virtualenv
214
214
215
-
Test your installation
215
+
Test your installation:
216
216
217
217
.. code-block:: console
218
218
@@ -226,23 +226,26 @@ Basic Usage
226
226
.. code-block:: console
227
227
228
228
$ cd my_project_folder
229
-
$ virtualenv my_project
229
+
$ virtualenv venv
230
230
231
-
``virtualenv my_project`` will create a folder in the current directory which will
231
+
``virtualenv venv`` will create a folder in the current directory which will
232
232
contain the Python executable files, and a copy of the ``pip`` library which you
233
233
can use to install other packages. The name of the virtual environment (in this
234
-
case, it was ``my_project``) can be anything; omitting the name will place the files
234
+
case, it was ``venv``) can be anything; omitting the name will place the files
235
235
in the current directory instead.
236
236
237
+
.. note::
238
+
'venv' is the general convention used globally. As it is readily available in ignore files (eg: .gitignore')
239
+
237
240
This creates a copy of Python in whichever directory you ran the command in,
238
-
placing it in a folder named :file:`my_project`.
241
+
placing it in a folder named :file:`venv`.
239
242
240
243
You can also use the Python interpreter of your choice (like
241
244
``python2.7``).
242
245
243
246
.. code-block:: console
244
247
245
-
$ virtualenv -p /usr/bin/python2.7 my_project
248
+
$ virtualenv -p /usr/bin/python2.7 venv
246
249
247
250
or change the interpreter globally with an env variable in ``~/.bashrc``:
248
251
@@ -254,12 +257,20 @@ or change the interpreter globally with an env variable in ``~/.bashrc``:
254
257
255
258
.. code-block:: console
256
259
257
-
$ source my_project/bin/activate
260
+
$ source venv/bin/activate
258
261
259
262
The name of the current virtual environment will now appear on the left of
260
-
the prompt (e.g. ``(my_project)Your-Computer:your_project UserName$)`` to let you know
263
+
the prompt (e.g. ``(venv)Your-Computer:your_project UserName$)`` to let you know
261
264
that it's active. From now on, any package that you install using pip will be
262
-
placed in the ``my_project`` folder, isolated from the global Python installation.
265
+
placed in the ``venv`` folder, isolated from the global Python installation.
266
+
267
+
For Windows, same command which is mentioned in step 1 can be used for creation of virtual environment. But, to activate, we use the following command.
268
+
269
+
Assuming that you are in project directory:
270
+
271
+
.. code-block:: powershell
272
+
273
+
PS C:\Users\suryav> \venv\Scripts\activate
263
274
264
275
Install packages as usual, for example:
265
276
@@ -281,9 +292,12 @@ To delete a virtual environment, just delete its folder. (In this case,
281
292
it would be ``rm -rf my_project``.)
282
293
283
294
After a while, though, you might end up with a lot of virtual environments
284
-
littered across your system, and its possible you'll forget their names or
295
+
littered across your system, and it's possible you'll forget their names or
285
296
where they were placed.
286
297
298
+
.. note::
299
+
Python has included venv module from version 3.3. For more details: `venv <https://docs.python.org/3/library/venv.html>`_.
300
+
287
301
Other Notes
288
302
~~~~~~~~~~~
289
303
@@ -293,7 +307,7 @@ for keeping the package list clean in case it needs to be accessed later.
293
307
[This is the default behavior for ``virtualenv`` 1.7 and later.]
294
308
295
309
In order to keep your environment consistent, it's a good idea to "freeze"
296
-
the current state of the environment packages. To do this, run
310
+
the current state of the environment packages. To do this, run:
297
311
298
312
.. code-block:: console
299
313
@@ -302,7 +316,7 @@ the current state of the environment packages. To do this, run
302
316
This will create a :file:`requirements.txt` file, which contains a simple
303
317
list of all the packages in the current environment, and their respective
304
318
versions. You can see the list of installed packages without the requirements
305
-
format using "pip list". Later it will be easier for a different developer
319
+
format using ``pip list``. Later it will be easier for a different developer
306
320
(or you, if you need to re-create the environment) to install the same packages
307
321
using the same versions:
308
322
@@ -343,7 +357,7 @@ To install (make sure **virtualenv** is already installed):
343
357
344
358
$ pip install virtualenvwrapper-win
345
359
346
-
In Windows, the default path for WORKON_HOME is %USERPROFILE%\Envs
360
+
In Windows, the default path for WORKON_HOME is %USERPROFILE%\\Envs
347
361
348
362
Basic Usage
349
363
~~~~~~~~~~~
@@ -363,7 +377,7 @@ This creates the :file:`my_project` folder inside :file:`~/Envs`.
363
377
$ workon my_project
364
378
365
379
Alternatively, you can make a project, which creates the virtual environment,
366
-
and also a project directory inside ``$WORKON_HOME``, which is ``cd``-ed into
380
+
and also a project directory inside ``$WORKON_HOME``, which is ``cd``-ed into
Copy file name to clipboardExpand all lines: docs/scenarios/ml.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ For installing the full stack, or individual packages, you can refer to the inst
41
41
scikit-learn
42
42
************
43
43
44
-
Scikit is a free and open-source machine learning library for Python. It offers off-the-shelf functions to implement many algorithms like linear regression, classifiers, SVMs, k-means, Neural Networks etc. It also has a few sample datasets which can be directly used for training and testing.
44
+
Scikit is a free and opensource machine learning library for Python. It offers off-the-shelf functions to implement many algorithms like linear regression, classifiers, SVMs, k-means, Neural Networks etc. It also has a few sample datasets which can be directly used for training and testing.
45
45
46
46
Because of its speed, robustness and easiness to use, it's one of the most widely-used libraries for many Machine Learning applications.
0 commit comments