简体   繁体   English

setup.py安装将文件保留在原处

[英]setup.py install leaving files where they are

I'm working with a custom package that I'd like to modify while I'm using it. 我正在使用一个自定义程序包,我想在使用它时对其进行修改。 When I run python setup.py install --user , it copies the files to another directory --- so everytime I make a change, I have to re- install with -f . 当我运行python setup.py install --user ,它将文件复制到另一个目录---因此,每次进行更改时,都必须使用-f重新install Is there a way to install without making a copy of the .py files --- so that I can keep modifying them in place? 有没有一种方法可以在不复制.py文件的情况下进行安装---这样我就可以继续对其进行修改了?

Do an "editable install": 执行“可编辑的安装”:

pip install --user -e .

This will add the current directory to your python path instead of copying the files into the packages directory. 这会将当前目录添加到您的python路径,而不是将文件复制到packages目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM