零基础学 Python(2018 版)
尹会生
前游戏公司技术总监,前新浪网技术经理
80141 人已学习
新⼈⾸单¥68
课程目录
已完结/共 72 讲
第一章 :Python介绍和安装 (3讲)
第二章 :Python基础语法 (3讲)
第四章 :条件与循环 (5讲)
第五章 :映射与字典 (2讲)
第六章 :文件和输入输出 (2讲)
第七章 :错误和异常 (1讲)
第九章 :模块 (1讲)
第十章 :语法规范 (1讲)
第十一章 :面向对象编程 (4讲)
第十二章 :多线程编程 (2讲)
第十六章 :综合案例 & 结课测试 (1讲)
特别放送 (1讲)
零基础学 Python(2018 版)
登录|注册
留言
17
收藏
沉浸
阅读
分享
手机端
回顶部
当前播放: 51 | 机器学习的一般流程与NumPy安装
00:00 / 00:00
高清
  • 高清
1.0x
  • 2.0x
  • 1.5x
  • 1.25x
  • 1.0x
  • 0.75x
  • 0.5x
网页全屏
全屏
00:00
付费课程,可试看
01 | Python语言的特点
02 | Python的发展历史与版本
03 | Python的安装
04 | Python程序的书写规则
05 | 基础数据类型
06 | 变量的定义和常用操作
07 | 序列的概念
08 | 字符串的定义和使用
09 | 字符串的常用操作
10 | 元组的定义和常用操作
11 | 列表的定义和常用操作
12 | 条件语句
13 | for循环
14 | while循环
15 | for循环语句中的if嵌套
16 | while循环语句中的if嵌套
17 | 字典的定义和常用操作
18 | 列表推导式与字典推导式
19 | 文件的内建函数
20 | 文件的常用操作
21 | 异常的检测和处理
22 | 函数的定义和常用操作
23 | 函数的可变长参数
24 | 函数的变量作用域
25 | 函数的迭代器与生成器
26 | Lambda表达式
27 | Python内建函数
28 | 闭包的定义
29 | 闭包的使用
30 | 装饰器的定义
31 | 装饰器的使用
32 | 自定义上下文管理器
33 | 模块的定义
34 | PEP8编码规范
35 | 类与实例
36 | 如何增加类的属性和方法
37 | 类的继承
38 | 类的使用-自定义with语句
39 | 多线程编程的定义
40 | 经典的生产者和消费者问题
41 | Python标准库的定义
42 | 正则表达式库re
43 | 正则表达式的元字符
44 | 正则表达式分组功能实例
45 | 正则表达式库函数match与search的区别
46 | 正则表达式库替换函数sub()的实例
47 | 日期与时间函数库
48 | 数学相关库
49 | 使用命令行对文件和文件夹操作
50 | 文件与目录操作库
51 | 机器学习的一般流程与NumPy安装
52 | NumPy的数组与数据类型
53 | NumPy数组和标量的计算
54 | NumPy数组的索引和切片
55 | pandas安装与Series结构
56 | Series的基本操作
57 | Dataframe的基本操作
58 | 层次化索引
59 | Matplotlib的安装与绘图
60 | 机器学习分类的原理
61 | Tensorflow的安装
62 | 根据特征值分类的模型和代码
63 | 网页数据的采集与urllib库
64 | 网页常见的两种请求方式get和post
65 | HTTP头部信息的模拟
66 | requests库的基本使用
67 | 结合正则表达式爬取图片链接
68 | Beautiful Soup的安装和使用
69 | 使用爬虫爬取新闻网站
70 | 使用爬虫爬取图片链接并下载图片
强势回归:零基础学Python2022版来啦!
71 | 如何分析源代码并设计合理的代码结构&结课测试
本节摘要

课程源码、课件及课后作业地址:

https://gitee.com/geektime-geekbang/geekbangpython

登录 后留言

全部留言(17)

  • 最新
  • 精选
人の初
老师,安装不了啊,报错(Windows的): Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32 pip3 install numpy File "<input>", line 1 pip3 install numpy ^ SyntaxError: invalid syntax

作者回复: pip3 install numpy 要在终端执行, 不要再python提示符下运行,它是一条类似 ping、 python 这类的命令,不是python 的函数

2019-06-27
2
asia~wz[]niubility[]
我是mac,那numpy的安装包下载包有区别吗?

作者回复: 没有区别的whl格式是pip封装的和平台无关

2018-11-07
1
Geek_b38273
老师,我直接在pycharm里的terminal中输入 pip install numpy就安装好了,这种方法可以作为日后学习的正规操作吗?

作者回复: 这个操作本身没有问题,但是要注意的是电脑上面可能装了python2 python3 等多个版本, 执行pip命令的时候可能为不同版本的python安装软件包, 要做一定区分,或者使用虚拟环境方式

2020-07-15
王志辉
老师,输入了命令如下: import numpy as np arr1 =np.array([2,3,4]) print( arr1) 显示结果如下: Process finished with exit code -1073741819 (0xC0000005) 请问是什么问题呢?

作者回复: 应该和ide有关系,不是python语言本身报的错

2020-03-21
Serendipity
老师,MAC 系统,使用 pip3 install numpy 命令报错,使用 pip install numpy 命令正常,这是什么原因呢?是因为默认就是 python 3 吗?谢谢。

作者回复: 你好,在linux 中 pip 如果是用rpm 安装,会产生 pip3 pip3.6和 pip 三个文件(当然一个是真正的命令,其他两个是快捷方式),在mac 中,如果程序没自动创建就没办法执行了,如果你使用pip比较习惯也可以手动创建 which pip <---找到pip命令的完整路径在哪里 ln -s /完整路径/pip /完整路径/pip3 <---创建个快捷方式即可 另外,一般mac系统只有pip3 没有pip命令,这种情况可能是使用了一些软件工具安装,并非官方安装包

2019-10-11
Dream
win10中安装不了numpy D:\untitled\1\Scripts>pip stall numpy Fatal Python error: Py_Initialize: unable to load the file system codec ModuleNotFoundError: No module named 'encodings' Current thread 0x00000d28 (most recent call first): 这样也不行 D:\untitled\1\Scripts>pip install numpy-1.16.4-cp36-cp36m-win_amd64.whl Fatal Python error: Py_Initialize: unable to load the file system codec ModuleNotFoundError: No module named 'encodings' Current thread 0x00000c20 (most recent call first):

作者回复: 使用 pip install numpy-1.16.4-cp36-cp36m-win_amd64.whl 这种方式安装,第一种方式需要安装编译器,比较麻烦 另外错误提示encodings 也要用pip先安装上, 使用pip install encodings 看看提示什么错误,根据错误来排查一下原因

2019-07-12
2
王涛
老师好,我的import numpy python 异常退出 显示 process finished with exit code 139 (interrupted by signal 11:SIGSEGV)

作者回复: free() close() 多次和引用空指针都会导致SIGSEGV ,建议你使用pip 重新安装 numpy

2019-03-17
asia~wz[]niubility[]
Collecting numpy Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x108120da0>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')': /simple/numpy/ Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x108120cc0>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')': /simple/numpy/ Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x108120a58>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')': /simple/numpy/ Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x108120a20>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')': /simple/numpy/ Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x1081206a0>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')': /simple/numpy/ Could not find a version that satisfies the requirement numpy (from versions: ) No matching distribution found for numpy 老师,不知道这是什么原因

作者回复: 网络原因导致安装包在线安装失败,可以通过搜索引擎找numpy的离线安装包,下载下来的格式是whl扩展名的,打开命令行,使用pip加完整路径安装,如: pip install /path/to/install/numpy-version-cp36-platform.whl

2018-11-06
积土$而沃
出现问题了,安装不了numpy,如下: bogon:~ Jason$ sudo pip3 install numpy Password: The directory '/Users/Jason/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/Users/Jason/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Collecting numpy Downloading https://files.pythonhosted.org/packages/6a/d5/218414f0f41cb3f183d55d68dbcd996fa3602d5849bdf2ad6c059e98fa68/numpy-1.15.0-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (24.5MB) 2% |▊ | 532kB 8.0kB/s eta 0:49:43Exception: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py", line 331, in _error_catcher yield File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py", line 413, in read data = self._fp.read(amt) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 62, in read data = self.__fp.read(amt) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 449, in read n = self.readinto(b) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 493, in readinto n = self.fp.readinto(b) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socket.py", line 586, in readinto return self._sock.recv_into(b) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 1009, in recv_into return self.read(

作者回复: 更新pip,然后将numpy的whl安装包下载到本地安装,很多软件源在国外,网络不稳定会导致安装失败。

2018-08-09
积土$而沃
老师 为什么我的numpy安装不了 pip3显示如下: bogon:~ Jason$ sudo pip3 install numpy Password: The directory '/Users/Jason/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/Users/Jason/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Collecting numpy Downloading https://files.pythonhosted.org/packages/6a/d5/218414f0f41cb3f183d55d68dbcd996fa3602d5849bdf2ad6c059e98fa68/numpy-1.15.0-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (24.5MB) 2% |▊ | 532kB 8.0kB/s eta 0:49:43Exception: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py", line 331, in _error_catcher yield File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py", line 413, in read data = self._fp.read(amt) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 62, in read data = self.__fp.read(amt) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 449, in read n = self.readinto(b) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 493, in readinto n = self.fp.readinto(b) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socket.py", line 586, in readinto return self._sock.recv_into(b) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 1009, in recv_into return se
2018-08-09
1
收起评论