Pip creates build/ directories

前端 未结 1 1426
既然无缘
既然无缘 2020-12-15 09:12

I use virtualenv to create isolated environments for my Python projects. Then i install dependencies with pip - Python package manager. Sometimes i forget to do source

相关标签:
1条回答
  • 2020-12-15 10:03

    The build directory is where a packages gets unpacked into and build from. When the package is installed successfully, pip removes the unpacked dir from build, unless you've removed pip-delete-this-directory.txt. As described in 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).
    

    Thus its less important for runtime environment. You could ignore it safely.

    Also, you could use pip install -b customized_build_directory to specify another directory as build base directory, for example /tmp

    Furthermore, you could pip install --no-download package_name to rebuild the package w/o downloading it, if the previous installation of the package failed.

    0 讨论(0)
提交回复
热议问题