【问题标题】:pipreqs not including all libraries used in requirements.txtpipreqs 不包括 requirements.txt 中使用的所有库
【发布时间】:2022-02-21 13:39:45
【问题描述】:

在 Windows 10 上的 Anaconda Prompt 中,我导航到我的项目目录并键入 pipreqs,这将创建一个 requirements.txt 文件。但是,它不包括我在项目中导入的所有库。

在我的项目中,我有两个 python 脚本。 Scraper.py 有:

from bs4 import BeautifulSoup
import requests
import time
from datetime import datetime, timezone
import pandas as pd

Bot.py 有:

import praw
import time
import pandas as pd
import os.path
from datetime import datetime, timezone
import config

requirements.txt 文件只包括:

pandas==1.1.3
requests==2.24.0
praw==7.1.0
beautifulsoup4==4.9.3

注意:我没有使用虚拟环境,在常规命令提示符中键入 pipreqs 会返回以下错误:

'pipreqs' is not recognized as an internal or external command, operable program, or batch file.

非常感谢您对此事的任何帮助。

【问题讨论】:

    标签: python requirements.txt


    【解决方案1】:

    看起来所有未包含的模块都是 Python 标准库模块!它们已经随 Python 一起提供了。

    【讨论】:

      猜你喜欢
      • 2022-12-14
      • 2021-02-14
      • 1970-01-01
      • 1970-01-01
      • 2020-01-14
      • 1970-01-01
      • 2021-06-12
      • 1970-01-01
      • 2021-07-01
      相关资源
      最近更新 更多