网站制作学习网Python→正文:pip install dotenv error: invalid command 'dist_info'
字体:

pip install dotenv error: invalid command 'dist_info'

Python 2024/4/21 22:16:39  点击:不统计


 python 环境需要加载.env 到系统环境中,但是需要安装dotenv 扩展。

 
使用命令 pip install dotenv 出现  error: invalid command 'dist_info'
 
 
  Collecting wheel
        Using cached wheel-0.43.0-py3-none-any.whl.metadata (2.2 kB)
      Collecting distribute
        Using cached distribute-0.7.3.zip (145 kB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Installing backend dependencies: started
        Installing backend dependencies: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error
      
        × Preparing metadata (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [6 lines of output]
            usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
               or: setup.py --help [cmd1 cmd2 ...]
               or: setup.py --help-commands
               or: setup.py cmd --help
      
            error: invalid command 'dist_info'
            [end of output]
      
        note: This error originates from a subprocess, and is likely not a problem with pip.
      error: metadata-generation-failed
      
      × Encountered error while generating package metadata.
      ╰─> See above for output.
      
      note: This is an issue with the package mentioned above, not pip.
      hint: See above for details.
  
后来搜索发现 dotenv 是需要安装python-dotenv 而不是dotenv

·上一篇:flask 创建web服务 >>    ·下一篇:flask web服务与命令行同时存在 >>
推荐文章
最新文章