使用 PyCharm 从 GitHub 安装 Python 包 [英] Install Python package from GitHub using PyCharm

查看:67
本文介绍了使用 PyCharm 从 GitHub 安装 Python 包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 PyCharm 中创建了一个 VirtualEnv 来安装我的 Python 包.我想从 GitHub 安装这个 django 项目的 fork.

I created a VirtualEnv in PyCharm to install my Python packages. I wanted to install this fork of the django project from GitHub.

https://github.com/django-nonrel/django

对于来自 PyPI 的包,我通常会使用 PyCharm 中的内置搜索工具,但我不确定如何从 GitHub 将其正确安装到 PyCharm 中的 VirtualEnv 中.有人知道怎么做吗?

For packages available from PyPI I would normally use the built-in search tool in PyCharm, but I'm not sure how to correctly install it into the VirtualEnv within PyCharm from GitHub. Would anyone know how to do this?

推荐答案

请参阅 Gord Thompson 的回答,了解与 Pycharm 一起使用的方法.

以下是如何在没有它的情况下使其工作的替代方法:

Here's an alternative of how to get this to work without it:

克隆存储库:

git clone https://github.com/django-nonrel/django.git my_folder

手动将其安装到您的 virtualenv 中:

The install it manually into your virtualenv:

cd my_folder
python setup.py build
python setup.py install

这篇关于使用 PyCharm 从 GitHub 安装 Python 包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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