Bug 1300356 - Can not install lxml to OpenShift online
Can not install lxml to OpenShift online
Status: CLOSED NOTABUG
Product: OpenShift Online
Classification: Red Hat
Component: Deployments (Show other bugs)
2.x
Unspecified Unspecified
unspecified Severity urgent
: ---
: ---
Assigned To: Vu Dinh
zhou ying
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-20 09:36 EST by lucas0033@gmail.com
Modified: 2016-03-04 09:26 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-01-26 17:59:11 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description lucas0033@gmail.com 2016-01-20 09:36:12 EST
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 11:30:44 EST
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 17:35:23 EST
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 17:59:11 EST
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 18:01:08 EST
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-20 20:19:30 EST
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 10:50:35 EST
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 15:53:31 EST
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 10:35:35 EST
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 12:15:20 EST
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 12:21:28 EST
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-03 22:37:56 EST
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 09:26:17 EST
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.