python -m unittest test_xxx.py TestClass
python -m pyftpdlib -d .
# 依赖: apt install python3-dev or yum install python3-devel.x86_64
#!/usr/bin/env python
import os
path = "."
fileList = os.listdir(path)
for i in fileList:
if ".ts" != os.path.splitext(i)[-1]:
continue
oldname = path + os.sep + i
newname = ".".join(oldname.split(".")[2:])
os.rename(oldname, newname)
# py2
wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
sudo python get-pip.py
# py3
# 依赖:apt install python3-distutils
wget https://bootstrap.pypa.io/get-pip.py
sudo python3 get-pip.py
- Q: ModuleNotFoundError: No module named '_ctypes'
- A: sudo yum install libffi-devel -y
- Q: 致命错误:Python.h:没有那个文件或目录
- A: sudo yum install python3-devel
-
Q: psycopg2安装失败, centos
-
A: yum install postgresql-devel*
-
Q: psycopg2安装失败, mac
-
A: pip3 install psycopg2-binary