Cannot download pip packages on LAMP/Bitnami server

242 Views Asked by At

I was developing an application on my machine using XAMPP and wanted to host the application. I followed the instructions on apachefriends and set up a server with Bitnami and the LAMP stack. I have some python scripts that I need to run with cron jobs on the server to update the application every once in a while. I was reading around and found out that LAMP doesn't actually support Python.

I tried to use pip to install some packages that I needed (Like pandas, urllib, etc.) but I couldn't install them due to some syntax errors in the installation. I'm assuming these errors came from Python not being compatible with LAMP. My question is, how can I get the pip packages that I need and run the python scripts? Would I have to switch providers?

The server has Python (3.4.2) but I can't run any of my scripts because they require pip packages. Could I do a secure transfer of the pip packages from my local machine to the server?

Beginning of the long error message after the command pip install pandas:

Downloading/unpacking pandas
  Downloading pandas-0.19.1.tar.gz (8.4MB): 8.4MB downloaded
  Running setup.py (path:/tmp/pip-build-phnk68m3/pandas/setup.py) egg_info for package pandas
    /bin/sh: 1: svnversion: not found
    /bin/sh: 1: svnversion: not found
    non-existing path in 'numpy/distutils': 'site.cfg'
    Could not locate executable gfortran
    Could not locate executable f95
    Could not locate executable ifort
    Could not locate executable ifc
    Could not locate executable lf95
    Could not locate executable pgfortran
    Could not locate executable f90
    Could not locate executable f77
    Could not locate executable fort
    Could not locate executable efort
    Could not locate executable efc
    Could not locate executable g77
    Could not locate executable g95
    Could not locate executable pathf95
    don't know how to compile Fortran code on platform 'posix'
    _configtest.c:1:5: warning: conflicting types for built-in function ‘exp’
     int exp (void);
         ^
    _configtest.o: In function `main':
    /tmp/easy_install-m3nli_19/numpy-1.12.0rc1/_configtest.c:6: undefined reference to `exp'
    collect2: error: ld returned 1 exit status
    _configtest.c:1:5: warning: conflicting types for built-in function ‘exp’
     int exp (void);
         ^
    _configtest.c:1:24: fatal error: sys/endian.h: No such file or directory
     #include <sys/endian.h>
                            ^
    compilation terminated.
    _configtest.c: In function ‘main’:
    _configtest.c:5:16: warning: variable ‘test_array’ set but not used [-Wunused-but-set-variable]
         static int test_array [1 - 2 * !(((long) (sizeof (npy_check_sizeof_type))) >= 0)];
                    ^

Edit: So I think the LAMP stack doesn't have a lot of the core requirements for numpy to run (fortran, c, other stuff). So I was thinking is there a way to link my local directory to the server and have the server get changes from my directory automatically?

1

There are 1 best solutions below

0
On

I ran into similar problem on ubuntu.

It seems that numpy has difficulties to install itself if non root.

I ran the following two commands and get it running:

sudo -H pip install numpy
sudo -H pip install pandas