pip 在哪里安装它的包? [英] Where does pip install its packages?

查看:41
本文介绍了pip 在哪里安装它的包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我激活了一个安装了 pip 的 virtualenv.我做过

I activated a virtualenv which has pip installed. I did

pip3 install Django==1.8

和 Django 成功下载.现在,我想打开 Django 文件夹.文件夹在哪里?

and Django successfully downloaded. Now, I want to open up the Django folder. Where is the folder located?

通常它会在下载"中,但如果我在 virtualenv 中使用 pip 安装它,我不确定它会在哪里.

Normally it would be in "downloads", but I'm not sure where it would be if I installed it using pip in a virtualenv.

推荐答案

pip 当与 virtualenv 一起使用时,通常会在 路径下安装包./lib//site-packages.

pip when used with virtualenv will generally install packages in the path <virtualenv_name>/lib/<python_ver>/site-packages.

例如,我使用 Python 2.7 创建了一个名为 venv_test 的测试 virtualenv,django 文件夹位于 venv_test/lib/python2.7/site-packages/django.

For example, I created a test virtualenv named venv_test with Python 2.7, and the django folder is in venv_test/lib/python2.7/site-packages/django.

这篇关于pip 在哪里安装它的包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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