【发布时间】:2017-05-05 07:41:44
【问题描述】:
我正在使用 XAMPP 在我的机器上开发一个应用程序,并希望托管该应用程序。我按照 apachefriends 上的说明使用 Bitnami 和 LAMP 堆栈设置了一个服务器。我有一些 python 脚本,我需要在服务器上运行 cron 作业,以每隔一段时间更新应用程序。我四处阅读,发现 LAMP 实际上并不支持 Python。
我尝试使用 pip 安装一些我需要的软件包(如 pandas、urllib 等),但由于安装中的一些语法错误,我无法安装它们。我假设这些错误来自与 LAMP 不兼容的 Python。我的问题是,我怎样才能获得我需要的 pip 包并运行 python 脚本?我需要更换供应商吗?
服务器有 Python (3.4.2) 但我无法运行我的任何脚本,因为它们需要 pip 包。我可以将 pip 包从本地计算机安全传输到服务器吗?
命令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)];
^
编辑:所以我认为 LAMP 堆栈对于运行 numpy 没有很多核心要求(fortran、c、其他东西)。所以我在想有没有办法将我的本地目录链接到服务器并让服务器自动从我的目录中获取更改?
【问题讨论】:
标签: php python apache hosting lamp