简体   繁体   中英

Cant install Python numpy in Cloud9

I'm new to Python and Cloud9, so I am not sure if I have a python issue or a Cloud9 issue (or both or something completely different)

My basic problem is that within Python I can import some modules, but not others. I've installed the modules 'xport' & 'numpy' with pip, but only 'xport' is working.

If I try to 'import numpy' i get the following error:

Python 2.7.6 (default, Nov 23 2017, 15:49:48) 
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import xport
>>> import numpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/numpy/__init__.py", line 153, in <module>
    from . import add_newdocs
  File "/usr/lib/python2.7/dist-packages/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "/usr/lib/python2.7/dist-packages/numpy/lib/__init__.py", line 18, in <module>
    from .polynomial import *
  File "/usr/lib/python2.7/dist-packages/numpy/lib/polynomial.py", line 19, in <module>
    from numpy.linalg import eigvals, lstsq, inv
  File "/usr/lib/python2.7/dist-packages/numpy/linalg/__init__.py", line 50, in <module>
    from .linalg import *
  File "/usr/lib/python2.7/dist-packages/numpy/linalg/linalg.py", line 29, in <module>
    from numpy.linalg import lapack_lite, _umath_linalg
ImportError: liblapack.so.3: cannot open shared object file: No such file or directory
>>> exit()

I've tried 'pip install numpy --upgrade', but it didn't fix anything. Where should I go from here?

Here's a URL that should help get you started in Cloud9 - get-scipy-stack-for-aws-lambda.sh . The key is to install with yum.

I can then import numpy in the Python shell and a simple Python script, but I'm having a problem getting it to work in the Lambda function itself, and it's having the same issue, unable to find the liblapack.so.3. Still working on that part. I, too, am very new to Cloud9.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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