繁体   English   中英

无法在LAMP / Bitnami服务器上下载pip软件包

[英]Cannot download pip packages on LAMP/Bitnami server

我正在使用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,其他东西)。 所以我在想是否可以将本地目录链接到服务器,并让服务器自动从我的目录中获取更改?

我在ubuntu上遇到了类似的问题。

似乎numpy如果不是root用户,则很难安装自身。

我运行了以下两个命令并使其运行:

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM