- 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!
- UI設計基礎培訓教程
- 微服務設計(第2版)
- C#高級編程(第10版) C# 6 & .NET Core 1.0 (.NET開發經典名著)
- 數據庫程序員面試筆試真題與解析
- Offer來了:Java面試核心知識點精講(原理篇)
- Learning Laravel 4 Application Development
- Learning Neo4j 3.x(Second Edition)
- Lua程序設計(第4版)
- Android Native Development Kit Cookbook
- Spring Boot+MVC實戰指南
- Android應用開發深入學習實錄
- Java編程從入門到精通
- Building Slack Bots
- C語言程序設計
- Opa Application Development