2017-05-14 75 views
1

我有一個不喜歡熊貓模塊的Openshift Python 3盒式金字塔服務器,但我無法弄清楚爲什麼它是如此。我的金字塔不喜歡熊貓

setup.py方法setuptools.setup被稱爲使用參數install_requires與幾個模塊(如pyramidbiopythonnumpy),其運行正常。但是當我添加pandas它失敗。這是它推動中說(✱=截尾增加了安全性):

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/' 

添加requirements.txt文件不其影響由於與當我ssh到服務器和PIP手動安裝也看到權限問題。即/var/lib/openshift不是我的虛擬環境。

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. 

虛擬python中的Pip3的確是一樣的。

cd /python/virtenv/venv/bin/ 
./pip3 install pandas 

Easy_install做得很對,但沒有權限,所以這種方法無論如何都是錯誤的。

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' 

我假設我應該用setuptools模塊來解決問題。這意味着我需要從那裏弄清楚爲什麼。但我被卡住了。

編輯。這不是我的磁盤配額。

Matteos-Air-3:pedel2 matteo$ rhc show-app pedel2 --gears quota 

Gear      Cartridges Used Limit 
------------------------ ---------- ------ ----- 
✱✱✱✱      python-3.3 268 MB 1 GB 
+0

你試圖安裝什麼Pandas版本? – MaxU

+0

最新。這是我第一次嘗試把熊貓放在那裏,所以我猜想它不能成爲一個版本的東西。 –

+0

另外,我已經從頭重新設置了服務器大約3次,以恢復ssh -too中的損壞,許多失敗的點可以使緩存溢出,並且達到1 GB的限制。 –

回答

1

我想你有幾個問題。

  1. 尺寸問題 - 很難重現它。但也許我們並不需要它(詳見下文)
  2. 現代大熊貓的版本不與Python 3.3兼容 - 見this

我建議你用「蓄勢待發」 distributives喜歡與蟒蛇已經預裝了numpy,熊貓等等。

除此之外 - 不要覆蓋systme Python - 它可能會導致另一個問題。

只需install Anaconda into a separate directory並設置Anaconda環境,每次你想使用它。

PS或者你可以有Anaconda as Docker

+0

我看到有一個用於Anaconda的OpenShift盒式磁帶。我打算放棄這一點。謝謝! –

+0

@MatteoFerla,很高興我能幫忙:-) – MaxU