How do I install a .whl file in a PyCharm virtualenv?

前端 未结 5 1811
孤街浪徒
孤街浪徒 2020-12-31 02:49

The package manager in Project Interpreter doesn\'t appear to have any way for me to run a pure pip command so I\'m unable to install the wheel as I normally would through c

5条回答
  •  天命终不由人
    2020-12-31 03:26

    You can install it from PyCharm's Python console with the pip module :

    import pip
    
    def install_whl(path):
        pip.main(['install', path])
    
    install_whl("path/to/file.whl")
    

提交回复
热议问题