Python 2 与 Python 3 的安装路径

Python 2 与 Python 3 的安装路径

/usr/local/lib/python2.7/dist-packages
/usr/local/lib/python3.5/dist-packages

yongqiang@famu-sys:/usr/local/lib/python2.7/dist-packages$ pwd
/usr/local/lib/python2.7/dist-packages
yongqiang@famu-sys:/usr/local/lib/python2.7/dist-packages$

yongqiang@famu-sys:/usr/local/lib/python3.5/dist-packages$ pwd
/usr/local/lib/python3.5/dist-packages
yongqiang@famu-sys:/usr/local/lib/python3.5/dist-packages$
yongqiang@famu-sys:~$ cd /usr/local/lib/
yongqiang@famu-sys:/usr/local/lib$ ll
总用量 16
drwxr-xr-x  4 root root  4096 3月   1  2018 ./
drwxr-xr-x 12 root root  4096 7月  18 20:51 ../
drwxrwsr-x  4 root staff 4096 3月   1  2018 python2.7/
drwxrwsr-x  3 root staff 4096 3月   1  2018 python3.5/
yongqiang@famu-sys:/usr/local/lib$
yongqiang@famu-sys:/usr/local/lib$ ll ./python2.7/
总用量 16
drwxrwsr-x   4 root staff 4096 3月   1  2018 ./
drwxr-xr-x   4 root root  4096 3月   1  2018 ../
drwxrwsr-x 104 root staff 4096 11月 18 10:42 dist-packages/
drwxrwsr-x   2 root staff 4096 3月   1  2018 site-packages/
yongqiang@famu-sys:/usr/local/lib$
yongqiang@famu-sys:/usr/local/lib$ ll ./python3.5/
总用量 12
drwxrwsr-x  3 root staff 4096 3月   1  2018 ./
drwxr-xr-x  4 root root  4096 3月   1  2018 ../
drwxrwsr-x 63 root staff 4096 11月 18 10:42 dist-packages/
yongqiang@famu-sys:/usr/local/lib$
yongqiang@famu-sys:~$ python
Python 2.7.12 (default, Dec  4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print(sys.executable)
/usr/bin/python
>>> exit()
yongqiang@famu-sys:~$

yongqiang@famu-sys:~$ python3
Python 3.5.2 (default, Nov 12 2018, 13:43:14)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print(sys.executable)
/usr/bin/python3
>>> exit()
yongqiang@famu-sys:~$
  • logging - Logging facility for Python

https://docs.python.org/3/library/logging.html

This module defines functions and classes which implement a flexible event logging system for applications and libraries.
日志系统

(base) yongqiang@yongqiang:~$ python
Python 3.9.5 (default, Jun  4 2021, 12:28:51)
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import logging
>>> logging.warning('Watch out!')
WARNING:root:Watch out!
>>>
>>> exit()
(base) yongqiang@yongqiang:~$
  • concurrent.futures - Launching parallel tasks

https://python.readthedocs.io/en/stable/library/concurrent.futures.html

The concurrent.futures module provides a high-level interface for asynchronously executing callables.
concurrent.futures 模块提供异步执行可调用对象高层接口。

References

https://yongqiang.blog.csdn.net/

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Yongqiang Cheng

梦想不是浮躁,而是沉淀和积累。

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值