如何在 PyCharm virtualenv 中安装 .whl 文件? [英] How do I install a .whl file in a PyCharm virtualenv?

查看:178
本文介绍了如何在 PyCharm virtualenv 中安装 .whl 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Project Interpreter 中的包管理器似乎无法让我运行纯 pip 命令,因此我无法像往常一样通过命令行安装轮子.

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 command line.

通过命令行运行会在我的基本 python 安装而不是 virtualenv 上安装轮子.帮助?

Running through command line installs the wheel on my base python install and not the virtualenv. Help?

推荐答案

要通过命令行安装,并避免在基础 Python 上安装,您必须先激活 virtualenv.

To install via your command line, and avoid installing on your base Python, you'll have to first activate the virtualenv.

您可以在 POSIX 上使用:

You can do this on POSIX using:

$ source path_to_your_venv/bin/activate

然后对于 Windows 系统:

And then for Windows systems:

> path_to_venv\Scripts\activate

然后您可以使用 .whl 文件安装 .whl 文件code>pip install filename.whl 而虚拟环境已被激活.

You can then install the .whl file with pip install filename.whl while the virtual env has been activated.

这篇关于如何在 PyCharm virtualenv 中安装 .whl 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆