OError: [Errno 26] Text file busy: '/…myvirtualenv/bin/python'

自古美人都是妖i 提交于 2019-12-05 00:04:21

I had the exact same problem :)

virtualenv works (afaik) by modifying a copy of the python executable in the virtualenv directory area.

You must have a process using the virtualenv already so the copy of the python executable is 'in use' (technically it's mmap()'ed into memory whilst it's executing).

Unless you need to change the setup of a virtualenv you don't need to re-run the virtualenv command every time - once it's setup you just activate it when needed.

As to why it happens - It's possible that you have a service running at boot time:

ps -ef | grep python
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!