我使用的virtualenv创建我的Python项目隔离的环境。 然后我安装带有画中画的依赖 - Python包管理器。 有时我忘记做source venv/bin/activate
,然后点子会创建build/
我的项目里面的目录。 为什么PIP创建它们? 我可以将它们删除,如果没有,我可以把它们放在我的.hgignore
文件?
据我了解,沿一个文件有下载的软件包的PIP门店源称为pip-delete-this-directory.txt
。 但是,当我删除它,一切仍然有效,因为真正的代码正在投入venv/lib/python2.7/site-packages/
。 那么什么是build/
真的?
在build
目录是一个包被解压到和建设。 当成功安装包,PIP将删除解压目录build
,除非你去除pip-delete-this-directory.txt
。 正如描述的pip-delete-this-directory.txt
:
This file is placed here by pip to indicate the source was put
here by pip.
Once this package is successfully installed this source code will be
deleted (unless you remove this file).
因此,其对运行环境不那么重要了。 你可以放心地忽略它。
此外,您还可以使用pip install -b customized_build_directory
指定其他目录作为build
的基本目录,例如/tmp
此外,你可以pip install --no-download package_name
,重建包W / O下载它,如果包以前安装失败。
在-b
选项似乎不适合我的情况下工作的时候建立某种原因,只有Visual Studio可以现在我需要_sodium.c和可悲的PIP删除它时,我不希望它太,因为我需要的拷贝修复失败该文件。