随笔分类 - python
摘要:1. Import-Module : 无法加载文件 D:\ProgramData\anaconda3\shell\condabin\Conda.psm1,因为在此系统上禁止运行脚本 1、找到Anaconda Powershell Prompt图标; 2、右击,然后选择管理员身份运行; 3、在Powe
阅读全文
摘要:不带文件路径到处所有安装包的版本(推荐用) pip list --format=freeze >requirement.txt 安装时 pip install -r requirements.txt
阅读全文
摘要:1. ModuleNotFoundError: No module named 'mysql' 需要安装链接驱动, 比如 pip install mysqlclient # 或 pip install pymysql # 或 pip install mysql-connector-python 2.
阅读全文
摘要:清华源仓库 pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple 阿里源仓库 pip config set global.index-url https://mirrors.aliyun.com/pypi/s
阅读全文
摘要:# 要查询的目录 directory = '/path/to/directory' # 获取目录下的所有文件和目录 contents = os.listdir(directory) # 筛选出所有的文件 files = [os.path.join(directory, f) for f in con
阅读全文