Bug 1300356 - Can not install lxml to OpenShift online
Summary: Can not install lxml to OpenShift online
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Deployments
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: ---
Assignee: Vu Dinh
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-20 14:36 UTC by lucas0033@gmail.com
Modified: 2016-03-04 14:26 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-26 22:59:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description lucas0033@gmail.com 2016-01-20 14:36:12 UTC
Description of problem:
I was able to install lxml in the past, but lately I wanted to move to a scalable app and I simply can not find a way to install lxml on OpenShift Online. 

How reproducible:
pip install lxml or easy_install lxml


Actual results:
Connection to app-nick.rhcloud.com closed by remote host.
Connection to app-nick.rhcloud.com closed.
Additional info:
I described my problem to stackoverflow - http://stackoverflow.com/questions/34900300/install-lxml-on-openshift-with-python-packages-only-pip-easy-install

Comment 1 lucas0033@gmail.com 2016-01-21 16:30:44 UTC
Based on comments in stackoverflow I should have mentioned that I use Python 2.7. Lxml with Python 3 is probably working fine.

Comment 2 Vu Dinh 2016-01-26 22:35:23 UTC
Hi Lucas,

I understand that one of our engineers Maciej has already been in contact with you to suggest the solution for your issue. I just want to restate it here for the record. Instead of ssh-ing to the gear and then manually pip install lxml, you should modify the requirements.txt file and add the lxml package. Just simply add "lxml==3.4.4" or whichever version you need to the file and then perform a git push (git add . && git commit -am "Install lxml" && git push). The lxml package should be installed properly for your app.

Thanks,
Vu

Comment 3 lucas0033@gmail.com 2016-01-26 22:59:11 UTC
Hi, yes he was in contact with me. However installing with requirements.txt file is same as pip, so it did not work. I do know know what was the problem, but Maciej suggested re-creating app from scratch and that worked. In newly created app I was able to run "pip install lxml" successfully. Weird error and I am sorry there is not a better solution. Thanks for help!

Comment 4 Vu Dinh 2016-01-26 23:01:08 UTC
Hi Lucas,

Thanks for a quick update and not a problem at all. Sometimes, it's just a glitch somewhere. I'm glad that everything is working for you.

Thanks again for letting us know.

Regards,
Vu

Comment 5 Michael 2016-02-21 01:19:30 UTC
Hello,

I am having the same issue, I cannot install lxml for a python 3.3 app.
I have tried several times to create an app from scratch but it does not change anything.

I described my problem on stackoverflow:
http://stackoverflow.com/questions/35529761/openshift-cant-install-lxml-for-python-app

I have tried using the requirements file.
I have also tried to ssh into the app and manually do a pip install lxml after activating the virtual env but it does not work either.

I am able to install other libraries. The problem happens only for lxml.

Thanks for your help.
Michael

Comment 6 Michael 2016-02-21 15:50:35 UTC
Quick update, it seems that it's only the latest version of lxml (3.5.0) that does not work.

It works using `lxml==3.4.4`.

Comment 7 Vu Dinh 2016-02-24 20:53:31 UTC
Hi Michael,

Sorry for the delay. It looks like the newest version of lxml (3.5.0) requires more memory which exceeds the 512 MB provided with small gear and it adds more features into the packages. As a result, that version can only be installed in medium gear or bigger unfortunately. So, I would recommend you to keep using 3.4.4 version if you plan to use small gear for your deployment.

Thanks,
Vu

Comment 8 Michael 2016-02-25 15:35:35 UTC
Ok thanks.

Also, do you plan to update python 3.3?
The current version is 3.3.2 and the latest 3.3 version is 3.3.6 which includes some bug fixes like for example for makedirs:
https://docs.python.org/3.3/library/os.html#os.makedirs

Otherwise, do you plan to add python 3.5.1?

Thanks

Comment 9 Vu Dinh 2016-02-25 17:15:20 UTC
Hi Michael,

As far as I can recall, we don't have any plans to upgrade the Python-3.3 cartridge nor release a Python-3.5 cartridge unfortunately.

However, technically speaking, you can create your own custom cartridge if you wish to do so. You can take a look at this link:

https://developers.openshift.com/en/get-involved-extend-openshift.html

Or feel free to google it out too :).

There is a repo I found that utilizes Python 3.3 even it's embedded cartridge, not a wed framework cartridge: Here is the link:

https://github.com/Praisebetoscience/openshift-cartridge-python-3.5

Also, I would recommend you to check out the new Openshift V3 at openshift/origin on github as well.

Anyway, if you have any further questions that aren't directly related to this bug, please create an issue in github for openshift/origin-server. It's quicker for us to answer your questions over there than here since this bug is closed.

Thanks,
Vu

Comment 10 Vu Dinh 2016-02-25 17:21:28 UTC
A typo on previous comment, I meam "There is a repo I found that utilizes Python 3.5 even it's embedded cartridge..."

Sorry about that.

Comment 11 Michael 2016-03-04 03:37:56 UTC
The repo above for a Python 3.5 cartridge does not work.

Would it be possible to get the source code of the Python-3.3 cartridge to adapt it to use Python 3.5 instead of starting from scratch?
Where can I find the Python3.3 cartridge code?

Thanks

Comment 12 Vu Dinh 2016-03-04 14:26:17 UTC
Hi Michael,

I would appreciate if you can post your questions on GitHub openshift/origin-server instead as the bug is now closed. Bugzilla is not intended for QA so we certainly want to avoid unrelated comments on the bug.

You can look at the code for python cartridge under openshift/origin-server/cartridges. However, unless you install OpenShift on your own system then you can change the code of python cartridge and build an rpm and then install it yourself. Otherwise, if you use OpenShift Online from our website then you can't do so. The only way to do that is to build the code from github and create a new app with Python 3.5 from there.

Regards,
Vu


Note You need to log in before you can comment on or make changes to this bug.