Python 在Openshift Django中使用Bower

Python 在Openshift Django中使用Bower,python,django,npm,openshift,bower,Python,Django,Npm,Openshift,Bower,我在Openshift中有一个应用程序,带有Python 2.7和Mysql 5.5的插件,我想在上面运行一个Django应用程序。我曾经开始构建这个应用程序 在本地,我使用bower作为包管理器,所以我已经安装了django bower,这样我就可以使/manage.py bower安装。我还在全球安装了bower: >which bower /usr/local/bin/bower which: no bower in (/var/lib/openshift/5425aaa0438*

我在Openshift中有一个应用程序,带有Python 2.7和Mysql 5.5的插件,我想在上面运行一个Django应用程序。我曾经开始构建这个应用程序

在本地,我使用bower作为包管理器,所以我已经安装了django bower,这样我就可以使
/manage.py bower安装
。我还在全球安装了bower:

>which bower
/usr/local/bin/bower
which: no bower in (/var/lib/openshift/5425aaa0438****47000094/python//virtenv/bin:/var/lib/openshift/5425aaa0438****47000094/python//bin:/opt/rh/python27/root/usr/bin:/bin:/usr/bin:/usr/sbin)
在本地,一切正常,当我尝试在openshift中部署时,问题就出现了。我已经读到bower应该安装在openshift中,但显然,我没有在全球范围内安装bower:

>which bower
/usr/local/bin/bower
which: no bower in (/var/lib/openshift/5425aaa0438****47000094/python//virtenv/bin:/var/lib/openshift/5425aaa0438****47000094/python//bin:/opt/rh/python27/root/usr/bin:/bin:/usr/bin:/usr/sbin)
因此,我尝试通过以下方式安装它:

export HOME=$OPENSHIFT_REPO_DIR
cd $HOME
npm cache clear
npm cache clean
npm install bower --prefix $OPENSHIFT_REPO_DIR
但在最后一个命令中,该输出失败:

npm http GET https://registry.npmjs.org/bower
npm http 200 https://registry.npmjs.org/bower
npm http GET https://registry.npmjs.org/bower/-/bower-1.3.12.tgz
npm http 200 https://registry.npmjs.org/bower/-/bower-1.3.12.tgz
npm WARN engine bower@1.3.12: wanted: {"node":">=0.10.0"} (current: {"node":"0.6.20","npm":"1.1.37"})
çnpm http GET https://registry.npmjs.org/abbrev
npm http GET https://registry.npmjs.org/archy/0.0.2
npm http GET https://registry.npmjs.org/bower-config
npm http GET https://registry.npmjs.org/bower-endpoint-parser
npm http GET https://registry.npmjs.org/bower-json
npm http GET https://registry.npmjs.org/bower-logger
npm http GET https://registry.npmjs.org/bower-registry-client
npm http GET https://registry.npmjs.org/chalk/0.5.0
npm http GET https://registry.npmjs.org/cardinal/0.4.0
npm http GET https://registry.npmjs.org/chmodr/0.1.0
npm http GET https://registry.npmjs.org/decompress-zip/0.0.8
npm http GET https://registry.npmjs.org/fstream
npm http GET https://registry.npmjs.org/fstream-ignore
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/handlebars
npm http GET https://registry.npmjs.org/inquirer/0.7.1
npm http GET https://registry.npmjs.org/insight/0.4.3
npm http GET https://registry.npmjs.org/is-root
npm http GET https://registry.npmjs.org/junk
npm http GET https://registry.npmjs.org/lockfile
npm http GET https://registry.npmjs.org/mkdirp/0.5.0
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/mout
npm http GET https://registry.npmjs.org/opn
npm http GET https://registry.npmjs.org/osenv/0.1.0
npm http GET https://registry.npmjs.org/p-throttler/0.1.0
npm http GET https://registry.npmjs.org/promptly/0.2.0
npm http GET https://registry.npmjs.org/q
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/request-progress/0.3.0
npm http GET https://registry.npmjs.org/retry/0.6.0
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/semver
[MORE OF THE SAME]
npm ERR! Error: ENOENT, chmod '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/graceful-fs/polyfills.js'
npm ERR!  { [Error: ENOENT, chmod '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/graceful-fs/polyfills.js']
npm ERR!   errno: 34,
npm ERR!   code: 'ENOENT',
npm ERR!   path: '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/graceful-fs/polyfills.js',
npm ERR!   fstream_finish_call: 'chmod',
npm ERR!   fstream_type: 'File',
npm ERR!   fstream_path: '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/graceful-fs/polyfills.js',
npm ERR!   fstream_class: 'FileWriter',
npm ERR!   fstream_stack: [ 'Object.oncomplete (/usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19)' ] }
npm ERR! You may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 2.6.32-431.29.2.el6.x86_64
npm ERR! command "node" "/usr/bin/npm" "install" "bower" "--prefix" "/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/"
npm ERR! cwd /var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo
npm ERR! node -v v0.6.20
npm ERR! npm -v 1.1.37
npm ERR! path /var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/graceful-fs/polyfills.js
npm ERR! fstream_path /var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/graceful-fs/polyfills.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! fstream_finish_call chmod
npm ERR! code ENOENT
npm ERR! message ENOENT, chmod '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/graceful-fs/polyfills.js'
npm ERR! errno 34
npm ERR! fstream_stack Object.oncomplete (/usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19)
npm ERR! 34 errno
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/bower-registry-client'
npm ERR! error rolling back  bower@1.3.12 { [Error: ENOTEMPTY, rmdir '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/bower-registry-client']
npm ERR! error rolling back   errno: 53,
npm ERR! error rolling back   code: 'ENOTEMPTY',
npm ERR! error rolling back   path: '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/bower-registry-client' }
npm ERR! Error: No compatible version found: ansi-styles@'^1.1.0'
npm ERR! Valid install targets:
npm ERR! ["0.1.0","0.1.1","0.1.2","0.2.0","1.0.0","1.1.0"]
npm ERR!     at installTargetsError (/usr/lib/node_modules/npm/lib/cache.js:588:10)
npm ERR!     at /usr/lib/node_modules/npm/lib/cache.js:466:15
npm ERR!     at saved (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:136:7)
npm ERR!     at Object.oncomplete (/usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:230:7)
npm ERR!  [Error: No compatible version found: ansi-styles@'^1.1.0'
npm ERR! Valid install targets:
npm ERR! ["0.1.0","0.1.1","0.1.2","0.2.0","1.0.0","1.1.0"]]
npm ERR! You may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 2.6.32-431.29.2.el6.x86_64
npm ERR! command "node" "/usr/bin/npm" "install" "bower" "--prefix" "/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/"
npm ERR! cwd /var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo
npm ERR! node -v v0.6.20
npm ERR! npm -v 1.1.37
npm ERR! message No compatible version found: ansi-styles@'^1.1.0'
npm ERR! message Valid install targets:
npm ERR! message ["0.1.0","0.1.1","0.1.2","0.2.0","1.0.0","1.1.0"]
npm ERR! Error: ENOENT, chmod '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/rimraf/test/test-sync.js'
npm ERR!  { [Error: ENOENT, chmod '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/rimraf/test/test-sync.js']
npm ERR!   errno: 34,
npm ERR!   code: 'ENOENT',
npm ERR!   path: '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/rimraf/test/test-sync.js',
npm ERR!   fstream_finish_call: 'chmod',
npm ERR!   fstream_type: 'File',
npm ERR!   fstream_path: '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/rimraf/test/test-sync.js',
npm ERR!   fstream_class: 'FileWriter',
npm ERR!   fstream_stack: [ 'Object.oncomplete (/usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19)' ] }
npm ERR! You may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 2.6.32-431.29.2.el6.x86_64
npm ERR! command "node" "/usr/bin/npm" "install" "bower" "--prefix" "/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/"
npm ERR! cwd /var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo
npm ERR! node -v v0.6.20
npm ERR! npm -v 1.1.37
npm ERR! path /var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/rimraf/test/test-sync.js
npm ERR! fstream_path /var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/rimraf/test/test-sync.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! fstream_finish_call chmod
npm ERR! code ENOENT
npm ERR! message ENOENT, chmod '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/rimraf/test/test-sync.js'
npm ERR! errno 34
npm ERR! fstream_stack Object.oncomplete (/usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19)
npm ERR! 34 errno
npm ERR! Error: ENOENT, lstat '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/mout/string.js'
npm ERR!  { [Error: ENOENT, lstat '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/mout/string.js']
npm ERR!   errno: 34,
npm ERR!   code: 'ENOENT',
npm ERR!   path: '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/mout/string.js',
npm ERR!   fstream_type: 'File',
npm ERR!   fstream_path: '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/mout/string.js',
npm ERR!   fstream_class: 'FileWriter',
npm ERR!   fstream_stack: [ 'Object.oncomplete (/usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26)' ] }
npm ERR! You may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 2.6.32-431.29.2.el6.x86_64
[MORE OF THE SAME]
npm ERR! 34 errno
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/npm-debug.log
npm ERR! not ok code undefined
npm ERR! not ok code 34
npmhttpgethttps://registry.npmjs.org/bower
npm http 200https://registry.npmjs.org/bower
npm http GEThttps://registry.npmjs.org/bower/-/bower-1.3.12.tgz
npm http 200https://registry.npmjs.org/bower/-/bower-1.3.12.tgz
警告引擎bower@1.3.12:通缉:{“节点”:“>=0.10.0”}(当前:{“节点”:“0.6.20”,“npm”:“1.1.37”})
çnpm http-GEThttps://registry.npmjs.org/abbrev
npm http GEThttps://registry.npmjs.org/archy/0.0.2
npm http GEThttps://registry.npmjs.org/bower-config
npm http GEThttps://registry.npmjs.org/bower-endpoint-parser
npm http GEThttps://registry.npmjs.org/bower-json
npm http GEThttps://registry.npmjs.org/bower-logger
npm http GEThttps://registry.npmjs.org/bower-registry-client
npm http GEThttps://registry.npmjs.org/chalk/0.5.0
npm http GEThttps://registry.npmjs.org/cardinal/0.4.0
npm http GEThttps://registry.npmjs.org/chmodr/0.1.0
npm http GEThttps://registry.npmjs.org/decompress-zip/0.0.8
npm http GEThttps://registry.npmjs.org/fstream
npm http GEThttps://registry.npmjs.org/fstream-ignore
npm http GEThttps://registry.npmjs.org/glob
npm http GEThttps://registry.npmjs.org/graceful-fs
npm http GEThttps://registry.npmjs.org/handlebars
npm http GEThttps://registry.npmjs.org/inquirer/0.7.1
npm http GEThttps://registry.npmjs.org/insight/0.4.3
npm http GEThttps://registry.npmjs.org/is-root
npm http GEThttps://registry.npmjs.org/junk
npm http GEThttps://registry.npmjs.org/lockfile
npm http GEThttps://registry.npmjs.org/mkdirp/0.5.0
npm http GEThttps://registry.npmjs.org/lru-cache
npm http GEThttps://registry.npmjs.org/nopt
npm http GEThttps://registry.npmjs.org/mout
npm http GEThttps://registry.npmjs.org/opn
npm http GEThttps://registry.npmjs.org/osenv/0.1.0
npm http GEThttps://registry.npmjs.org/p-throttler/0.1.0
npm http GEThttps://registry.npmjs.org/promptly/0.2.0
npm http GEThttps://registry.npmjs.org/q
npm http GEThttps://registry.npmjs.org/request
npm http GEThttps://registry.npmjs.org/request-progress/0.3.0
npm http GEThttps://registry.npmjs.org/retry/0.6.0
npm http GEThttps://registry.npmjs.org/rimraf
npm http GEThttps://registry.npmjs.org/semver
[更多相同]
npm错误!错误:enoint,chmod'/var/lib/openshift/5425aaa044382ec0447000094/app root/runtime/repo/nodeêmodules/bower/nodeêmodules/destancefs/polyfills.js'
npm错误!{[Error:enoint,chmod'/var/lib/openshift/5425aaa044382ec0447000094/app root/runtime/repo/node_modules/bower/node_modules/destancefs/polyfills.js']
npm错误!错误号:34,
npm错误!代码:“enoint”,
npm ERR!path:'/var/lib/openshift/5425aaa044382ec0447000094/app root/runtime/repo/node_modules/bower/node_modules/destanced fs/polyfills.js',
npm ERR!fstream\u finish\u调用:“chmod”,
npm ERR!fstream_类型:“文件”,
npm ERR!fstream_path:'/var/lib/openshift/5425aaa044382ec0447000094/app root/runtime/repo/node_modules/bower/node_modules/delegate fs/polyfills.js',
npm ERR!fstream_类:“FileWriter”,
npm ERR!fstream_stack:['Object.oncomplete(/usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19)]}
npm错误!您可以在以下位置报告此日志:
npm错误!
npm错误!或通过电子邮件发送至:
npm错误!
npm错误!系统Linux 2.6.32-431.29.2.el6.x86_64
npm错误!命令“node”“/usr/bin/npm”“安装”“bower”“--前缀”“/var/lib/openshift/5425aaa044382ec0447000094/app root/runtime/repo/”
npm错误!cwd/var/lib/openshift/5425aaa04382ec0447000094/app root/runtime/repo
npm错误!节点-v v0.6.20
npm错误!npm-V1.1.37
npm错误!path/var/lib/openshift/5425aaa044382ec0447000094/app root/runtime/repo/node_modules/bower/node_modules/designe fs/polyfills.js
npm错误!fstream_-path/var/lib/openshift/5425aaa044382ec0447000094/app root/runtime/repo/node_-modules/bower/node_-modules/delegate fs/polyfills.js
npm错误!fstream_类型文件
npm错误!fstream_类文件编写器
npm错误!fstream\u finish\u调用chmod
npm错误!代码eNONT
npm错误!消息enoint,chmod'/var/lib/openshift/5425aaa044382ec0447000094/app root/runtime/repo/nodeêmodules/bower/nodeêmodules/destancefs/polyfills.js'
npm错误!埃尔诺34
npm错误!fstream_stack Object.oncomplete(/usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19)
npm错误!34埃尔诺
npm错误!回滚错误时出错错误:en诱惑,rmdir'/var/lib/openshift/5425aaa044382ec0447000094/app root/runtime/repo/node\u modules/bower/node\u modules/bower注册表客户端'
npm错误!回滚错误bower@1.3.12{[错误:enotenty,rmdir'/var/lib/openshift/5425aaa044382ec0447000094/app root/runtime/repo/node_modules/bower/node_modules/bower registry client']
npm ERR!回滚错误号:53,
npm ERR!回滚代码时出错:“e诱惑”,
npm ERR!回滚路径时出错:'/var/lib/openshift/5425aaa044382ec0447000094/app root/runtime/repo/node\u modules/bower/node\u modules/bower registry client'}
npm错误!错误:找不到兼容版本:ansi样式“^1.1.0”
npm错误!有效的安装目标:
npm错误!["0.1.0","0.1.1","0.1.2","0.2.0","1.0.0","1.1.0"]
npm错误!在installTargetsError(/usr/lib/node_modules/npm/lib/cache.js:588:10)
npm错误!在/usr/lib/node_modules/npm/lib/cache.js:466:15
npm错误!保存时(/usr/lib/node_modules/npm/node_modules/npm registry client/lib/get.js:136:7)
npm错误!在Object.oncomplete(/usr/lib/node_modules/npm/node_modules/generate fs/generate fs.js:230:7)
npm错误![错误:没有兼容的版本fou