Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
openshift:can';t安装用于python应用程序的lxml_Python_Git_Openshift_Lxml - Fatal编程技术网

openshift:can';t安装用于python应用程序的lxml

openshift:can';t安装用于python应用程序的lxml,python,git,openshift,lxml,Python,Git,Openshift,Lxml,我正在尝试Openshift,但无法使用lxml部署python应用程序 下面是我的步骤,我只添加了一个lxml需求。错误发生在我按下按钮时 我能够ssh,所以我认为这不是连接问题 如果我不添加lxml需求,而是添加一些其他库,它就可以工作 问题只存在于lxml。我认为这是因为它有一些系统依赖性(我以前必须在ubuntu机器上运行它:sudo apt get install-y libxml2 dev libxslt dev python dev) 然而,我不认为我能为openshift应用程序

我正在尝试Openshift,但无法使用
lxml
部署python应用程序

下面是我的步骤,我只添加了一个
lxml
需求。错误发生在我按下按钮时

我能够ssh,所以我认为这不是连接问题

如果我不添加lxml需求,而是添加一些其他库,它就可以工作

问题只存在于lxml。我认为这是因为它有一些系统依赖性(我以前必须在ubuntu机器上运行它:
sudo apt get install-y libxml2 dev libxslt dev python dev

然而,我不认为我能为openshift应用程序做到这一点。那么没有办法安装lxml了吗


命令

rhc app create testlxml python-3.3
echo 'lxml' > testlxml/requirements.txt
cd testlxml
git add .
git commit -m "Add lxml requirement"
git push
结果:

vagrant@dev:~$ rhc app create testlxml python-3.3
RSA 1024 bit CA certificates are loaded due to old openssl compatibility
Application Options
-------------------
Domain:     mikep
Cartridges: python-3.3
Gear Size:  default
Scaling:    no

Creating application 'testlxml' ... done


Waiting for your DNS name to be available ... done

Cloning into 'testlxml'...
Warning: Permanently added the RSA host key for IP address '54.84.57.164' to the list of known hosts.

Your application 'testlxml' is now available.

  URL:        http://testlxml-mikep.rhcloud.com/
  SSH to:     56c8e1a789f5cf57a3000116@testlxml-mikep.rhcloud.com
  Git remote: ssh://56c8e1a789f5cf57a3000116@testlxml-mikep.rhcloud.com/~/git/testlxml.git/
  Cloned to:  /home/vagrant/testlxml

Run 'rhc show-app testlxml' for more details about your app.

vagrant@dev:~$ echo 'lxml' > testlxml/requirements.txt
vagrant@dev:~$ cd testlxml
vagrant@dev:~/testlxml$ git add .
vagrant@dev:~/testlxml$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        modified:   requirements.txt

vagrant@dev:~/testlxml$ git commit -m "Add lxml requirement"
[master c1776a9] Add lxml requirement
 1 file changed, 1 insertion(+)

vagrant@dev:~/testlxml$ git push
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:

  git config --global push.default matching

To squelch this message and adopt the new behavior now, use:

  git config --global push.default simple

When push.default is set to 'matching', git will push local branches
to the remote branches that already exist with the same name.

In Git 2.0, Git will default to the more conservative 'simple'
behavior, which only pushes the current branch to the corresponding
remote branch that 'git pull' uses to update the current branch.

See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)

Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 270 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Stopping Python 3.3 cartridge
remote: Waiting for stop to finish
remote: Waiting for stop to finish
remote: Building git ref 'master', commit c1776a9
remote: Activating virtenv
remote: Checking for pip dependency listed in requirements.txt file..
remote: The directory '/var/lib/openshift/56c8e1a789f5cf57a3000116/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
remote: The directory '/var/lib/openshift/56c8e1a789f5cf57a3000116/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
remote: Collecting lxml (from -r /var/lib/openshift/56c8e1a789f5cf57a3000116/app-root/runtime/repo/requirements.txt (line 1))
remote:   Downloading http://mirror1.ops.rhcloud.com/mirror/python/web/packages/source/l/lxml/lxml-3.5.0.tar.gz (3.8MB)
remote: Installing collected packages: lxml
remote:   Running setup.py install for lxml: started
Connection to testlxml-mikep.rhcloud.com closed by remote host.
fatal: The remote end hung up unexpectedly
error: error in sideband demultiplexer
To ssh://56c8e1a789f5cf57a3000116@testlxml-mikep.rhcloud.com/~/git/testlxml.git/
   cfd1b36..c1776a9  master -> master
error: failed to push some refs to 'ssh://56c8e1a789f5cf57a3000116@testlxml-mikep.rhcloud.com/~/git/testlxml.git/'
vagrant@dev:~$rhc应用程序创建testlxml python-3.3
由于旧的openssl兼容性,已加载RSA 1024位CA证书
应用程序选项
-------------------
域名:mikep
盒带:python-3.3
档位大小:默认值
缩放:没有
正在创建应用程序“testlxml”。。。完成
正在等待您的DNS名称可用。。。完成
正在克隆到“testlxml”。。。
警告:已将IP地址“54.84.57.164”的RSA主机密钥永久添加到已知主机列表中。
您的应用程序“testlxml”现在可用。
网址:http://testlxml-mikep.rhcloud.com/
SSH到:56c8e1a789f5cf57a3000116@testlxml-mikep.rhcloud.com
Git远程:ssh://56c8e1a789f5cf57a3000116@testlxml mikep.rhcloud.com/~/git/testlxml.git/
克隆到:/home/vagrant/testlxml
运行“rhc show app testlxml”了解有关应用程序的更多详细信息。
vagrant@dev:~$echo'lxml'>testlxml/requirements.txt
vagrant@dev:~$cd testlxml
vagrant@dev:~/testlxml$git add。
vagrant@dev:~/testlxml$git状态
论分行行长
您的分支机构是最新的“原始/主”分支机构。
要提交的更改:
(使用“git重置磁头…”取消分级)
修改:requirements.txt
vagrant@dev:~/testlxml$git commit-m“添加lxml要求”
[master c1776a9]添加lxml要求
1个文件已更改,1个插入(+)
vagrant@dev:~/testlxml$git push
警告:push.default未设置;其隐含价值在不断变化
Git2.0从“匹配”到“简单”。要压制此消息
并在默认更改后保持当前行为,请使用:
git config--全局推送.default匹配
要立即消除此消息并采用新行为,请使用:
git config——global push.default simple
当push.default设置为“匹配”时,git将推送本地分支
已存在同名的远程分支。
在Git2.0中,Git将默认为更保守的“简单”
行为,它仅将当前分支推送到相应的
“git pull”用于更新当前分支的远程分支。
有关更多信息,请参阅“git帮助配置”并搜索“push.default”。
(Git 1.7.11中引入了“简单”模式。请使用类似的模式
(如果有时使用较旧版本的Git,则使用“当前”而不是“简单”)
计数对象:5,完成。
增量压缩最多使用4个线程。
压缩对象:100%(2/2),完成。
写入对象:100%(3/3),270字节| 0字节/秒,完成。
总计3(增量1),重复使用0(增量0)
远程:停止Python 3.3盒式磁带
远程:等待停止完成
远程:等待停止完成
远程:构建git ref“master”,提交c1776a9
远程:激活virtenv
远程:检查requirements.txt文件中列出的pip依赖项。。
远程:目录“/var/lib/openshift/56c8e1a789f5cf57a3000116/.cache/pip/http”或其父目录不属于当前用户,并且缓存已被禁用。请检查该目录的权限和所有者。如果使用sudo执行pip,您可能需要sudo的-H标志。
远程:目录“/var/lib/openshift/56c8e1a789f5cf57a3000116/.cache/pip”或其父目录不属于当前用户,缓存控制盘已被禁用。检查该目录的权限和所有者。如果使用sudo执行pip,您可能需要sudo的-H标志。
远程:收集lxml(来自-r/var/lib/openshift/56c8e1a789f5cf57a300116/app root/runtime/repo/requirements.txt(第1行))
远程:下载http://mirror1.ops.rhcloud.com/mirror/python/web/packages/source/l/lxml/lxml-3.5.0.tar.gz (3.8MB)
远程:安装收集的软件包:lxml
远程:为lxml运行setup.py安装:已启动
远程主机已关闭到testlxml-mikep.rhcloud.com的连接。
致命:远程端意外挂起
错误:边带解复用器中的错误
到ssh://56c8e1a789f5cf57a3000116@testlxml mikep.rhcloud.com/~/git/testlxml.git/
cfd1b36..c1776a9主控->主控
错误:无法将某些引用推送到'ssh://56c8e1a789f5cf57a3000116@testlxml mikep.rhcloud.com/~/git/testlxml.git/'

Openshift只能在上次检查时编译/安装'lxml==3.2.5'

将setup.py中的“requires”设置为“lxml==3.2.5”。

解决方案:


最新版本的
lxml
3.5.0
)不起作用,但
lxml==3.4.4
起作用。

push
命令出错需要多长时间?您在
testlxml mikep.rhcloud.com
上的repo权限是否正确?我刚刚尝试了一些其他库,它可以正常工作。所以问题在于lxml。我认为这是因为它有一些系统依赖性(我以前必须在ubuntu机器上运行它:
sudo apt get install-y libxml2 dev libxslt dev python dev
),但是我认为我不能为openshift应用程序这样做。那么,没有办法安装lxml了吗?谢谢你的提示,我没有想过要尝试旧版本。它似乎工作到
lxml==3.4.4