- Machine Learning for OpenCV
- Michael Beyeler
- 344字
- 2021-07-02 19:47:17
Starting a new IPython or Jupyter session
Before we can get our hands on NumPy, we need to open an IPython shell or start a Jupyter Notebook:
- Open a terminal like we did in the previous chapter, and navigate to the opencv-machine-learning directory:
$ cd Desktop/opencv-machine-learning
- Activate the conda environment we created in the previous chapter:
$ source activate Python3 # Mac OS X / Linux
$ activate Python3 # Windows
- Start a new IPython or Jupyter session:
$ ipython # for an IPython session
$ jupyter notebook # for a Jupyter session
If you chose to start an IPython session, the program should have greeted you with a welcome message such as the following:
$ ipython
Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.
IPython 3.5.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]:
The line starting with In [1] is where you type in your regular Python commands. In addition, you can also use the Tab key while typing the names of variables and functions in order to have IPython automatically complete them.
If you chose to start a Jupyter session, a new window should have opened in your web browser that is pointing to http://localhost:8888. You want to create a new notebook by clicking on New in the top-right corner and selecting Notebooks (Python3):

This will open a new window that looks like this:

The cell labeled with In [ ] is the same as the command line in an IPython session. Now you can start typing your Python code!
- 大學計算機基礎(第三版)
- TypeScript Blueprints
- 潮流:UI設計必修課
- MySQL數據庫基礎實例教程(微課版)
- Symfony2 Essentials
- 數據結構與算法分析(C++語言版)
- Test-Driven JavaScript Development
- HTML+CSS+JavaScript網頁設計從入門到精通 (清華社"視頻大講堂"大系·網絡開發視頻大講堂)
- Android Development Tools for Eclipse
- Visual Basic程序設計全程指南
- HTML+CSS+JavaScript網頁制作:從入門到精通(第4版)
- 分布式架構原理與實踐
- Android智能手機APP界面設計實戰教程
- Java EE項目應用開發
- PHP程序設計高級教程