[root@CentOS ~]# git clone https://github.com/wangy8961/python3-concurrency-pics-01.git
[root@CentOS ~]# cd python3-concurrency-pics-01/
如果你的操作系统是Linux
:
[root@CentOS python3-concurrency-pics-01]# python3 -m venv venv3
[root@CentOS python3-concurrency-pics-01]# source venv3/bin/activate
Windows
激活虚拟环境的命令是:venv3\Scripts\activate
如果你的操作系统是Linux
:
(venv3) [root@CentOS python3-concurrency-pics-01]# pip install -r requirements-linux.txt
如果你的操作系统是Windows
(不会使用uvloop
):
(venv3) C:\Users\wangy> pip install -r requirements-win32.txt
(venv3) [root@CentOS python3-concurrency-pics-01]# python sequential.py
(venv3) [root@CentOS python3-concurrency-pics-01]# python threadpool.py
(venv3) [root@CentOS python3-concurrency-pics-01]# python asynchronous.py
- Python3爬虫系列01 (理论) - I/O Models 阻塞 非阻塞 同步 异步
- Python3爬虫系列02 (理论) - Python并发编程
- Python3爬虫系列06 (理论) - 可迭代对象、迭代器、生成器
- Python3爬虫系列07 (理论) - 协程
- Python3爬虫系列08 (理论) - 使用asyncio模块实现并发