长时间不活动后,我正在更新项目,但出现了问题。部署失败,并且在之后应用程序未重新启动git push
。
我仍然可以通过运行手动启动我的应用程序gear start
,但是要成功安装程序包所需的部署步骤将install_requires
失败。
以下是部分gear deploy
输出:
Activating virtenv
Running setup.py script..
running develop
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/usr/lib/python2.6/site-packages/test-easy-install-358943.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/usr/lib/python2.6/site-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
http://peak.telecommunity.com/EasyInstall.html
Please make the appropriate changes for your system and try again.
然后:
Running collectstatic...
Traceback (most recent call last):
File "~/app-root/runtime/repo//wsgi/music/manage.py", line 2, in <module>
from django.core.management import execute_manager
ImportError: No module named django.core.management
我试图启用venv并手动运行setup.py:
source $OPENSHIFT_GEAR_DIR/virtenv/bin/activate
export PYTHON_EGG_CACHE=$OPENSHIFT_GEAR_DIR/virtenv/lib/python-2.6
~/app-root/repo/setup.py develop
但是,它导致了相同的can't create or remove files in install directory
错误。而且,我也无法manage.py
像之前那样在这种环境中运行。
在我看来,venv发生了一些事情,但是后来也gear start
使用了它,它仍然有效...
有人可以给我介绍这个问题的重点吗?
PS我正在使用Python 2.6墨盒
至少,我已经开始工作了。符号链接杂乱无章,virtenv/lib64
->../../python-2.6/virtenv/lib
只能从访问~/python-2.6
,它是的符号链接~/python
,其中包含virtenv
,实际上是由环境变量引用的,这是另一个指向的符号链接~/app-root/runtime/dependencies/python/virtenv
。结果,virtenv python解释器无法在其中找到库和其他内容virtenv/lib64
,因此回退到/usr
前缀。
我只是指出了lib64
->lib
并且现在可以部署了。
但是,所有这些混乱都是由OpenShift工具链造成的,我不确定它不会再次崩溃。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句