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
Based on comments in stackoverflow I should have mentioned that I use Python 2.7. Lxml with Python 3 is probably working fine.
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
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!
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
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
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`.
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
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
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
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.
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
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