pip可编辑安装在只读文件系统上



是否可以从只读文件系统上的目录中进行可编辑的pip安装?现在安装工具正试图将egg文件写入源目录:

$ pip install -e /tf/stuff/
Obtaining file:///tf/stuff
    Complete output from command python setup.py egg_info:
    running egg_info
    writing requirements to src/stuff.egg-info/requires.txt
    error: [Errno 30] Read-only file system: 'src/stuff.egg-info/requires.txt'
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tf/stuff/

医生说:

对于本地项目,会创建"SomeProject.egg info"目录相对于项目路径。这是一个优势,而不仅仅是使用setup.py develop,它直接相对于当前工作目录。

如果您的环境中有任何可写的文件系统,您可能可以执行我所做的操作。我在源目录中创建了一个符号链接(在您的示例中为src/stuff.egg-info(,该链接指向一个可写的位置(可能在不同的读写文件系统上(,并且能够使pip install -e .工作。

相关内容

最新更新