I have a Pyramid server on an Openshift Python 3 cartridge that does not like the module Pandas, but I cannot figure how to figure out why it is so.
In setup.py
the method setuptools.setup
is called with the argument install_requires
with a few modules (such as pyramid
,biopython
,numpy
), which run fine. But when I add pandas
it fails. This is what it says during pushing (✱ = censoring added for security):
remote: Installing collected packages: six, python-dateutil, pytz, pandas
remote: Found existing installation: six 1.3.0
remote: Not uninstalling six at /opt/rh/python33/root/usr/lib/python3.3/site-packages, outside environment /var/lib/openshift/✱✱✱✱✱/python/virtenv/venv
remote: Running setup.py install for pandas: started
remote: Running setup.py install for pandas: still running...
remote: Running setup.py install for pandas: still running...
remote: Running setup.py install for pandas: still running...
remote: Running setup.py install for pandas: still running...
remote: Running setup.py install for pandas: still running...
remote: Running setup.py install for pandas: still running...
Connection to pedel2-matteoferla.rhcloud.com closed by remote host.
fatal: The remote end hung up unexpectedly
error: error in sideband demultiplexer
To ssh://pedel2-matteoferla.rhcloud.com/~/git/pedel2.git/
✱✱✱ master -> master
error: failed to push some refs to 'ssh://✱✱✱✱@pedel2-matteoferla.rhcloud.com/~/git/pedel2.git/'
Adding a requirements.txt
file does not affect it due to permission issues seen also with when I ssh into the server and pip install it manually. Namely /var/lib/openshift
isn't my virtual environment.
remote: Activating virtenv
remote: Checking for pip dependency listed in requirements.txt file..
remote: The directory '/var/lib/openshift/✱✱✱✱/.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.
Pip3 within the virtual python does the same.
cd /python/virtenv/venv/bin/
./pip3 install pandas
Easy_install does it right but has no permission, so this approach is wrong anyway.
pedel2-matteoferla.rhcloud.com bin]\> ./easy_install pandas
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 122] Disk quota exceeded: '/var/lib/openshift/✱✱✱✱/python/virtenv/venv/lib/python3.3/site-packages/test-easy-install-247598.write-test'
I assume I ought to solve the problem with setuptools module. Which means I need to figure out why from there. But I am stuck.
EDIT. It is not my disk quota.
Matteos-Air-3:pedel2 matteo$ rhc show-app pedel2 --gears quota
Gear Cartridges Used Limit
------------------------ ---------- ------ -----
✱✱✱✱ python-3.3 268 MB 1 GB
I think you have a few issues.
I'd recommend you to use "ready to go" distributives like Anaconda with already preinstalled numpy, pandas and lot more.
Beside that - don't overwrite systme Python - it might cause another problems.
Just install Anaconda into a separate directory and set Anaconda environment everytime you want to use it.
PS alternatively you can have Anaconda as Docker