Virtualenvwrapper .hook:权限被拒绝

发布于 2024-08-27 17:24:52 字数 519 浏览 4 评论 0原文

我之前使用过 virtualenvwrapper,但在新计算机上运行它时遇到问题。我的 .bashrc 文件按照说明进行更新:

export WORKON_HOME=$DEV_HOME/projects
source /usr/local/bin/virtualenvwrapper.sh

但是当 source 运行时,我得到以下信息:

bash: /25009.hook: Permission denied
bash: /25009.hook: No such file or directory

这篇文章让我相信文件名正在被回收并锁定,因为virtualenvwrapper.sh使用$$。有什么办法可以解决这个问题吗?

I've used virtualenvwrapper previously, but I'm having problems running it on a new computer. My .bashrc file is updated per the instructions:

export WORKON_HOME=$DEV_HOME/projects
source /usr/local/bin/virtualenvwrapper.sh

But when source is run, I get the following:

bash: /25009.hook: Permission denied
bash: /25009.hook: No such file or directory

This previous post leads me to believe the filename is being recycled and locked because virtualenvwrapper.sh uses $$. Is there any way to fix this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

千纸鹤带着心事 2024-09-03 17:24:52

尝试将 virtualenvs 目录存储在保证不会出现任何权限错误的地方(甚至可以尝试使用绝对路径)。另外,您确定您手动创建了“projects”目录吗?

作为参考,我的 bashrc 文件看起来像这样:

export WORKON_HOME=/srv/.virtualenvs/
export PIP_VIRTUALENV_BASE = WORKON_HOME
source /usr/local/bin/virtualenvwrapper.sh

我的 .virtualenvs 目录被 chmodded 为 755。

Try storing your virtualenvs directory somewhere you are guaranteed not to have any permissions errors (and maybe even try using the absolute path). Also, are you sure you created the 'projects' directory manually?

For reference, my bashrc file looks something like this:

export WORKON_HOME=/srv/.virtualenvs/
export PIP_VIRTUALENV_BASE = WORKON_HOME
source /usr/local/bin/virtualenvwrapper.sh

And my .virtualenvs directory is chmodded to 755.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文