我是Python新手,正在寻求帮助。下面的Python Lambda函数向我抛出预期的错误。在
Unable to import module 'lambda_function': No module named 'stomp'
Python羔脚本:-在
^{pr2}$我用mac来执行命令,下面是错误:-在
sudo pip install stompy -t /Users/kalyanbhave/Documents/stomp/
Password:
The directory '/Users/kalyanbhave/Library/Caches/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.
The directory '/Users/kalyanbhave/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting stompy
Downloading https://files.pythonhosted.org/packages/af/21/8f3bdf1f304ba65847706c29d1950525513ec11d941ed0630ee8af51b361/stompy-0.2.9.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/tmp/pip-install-rgmh5da6/stompy/setup.py", line 2, in <module>
from stompy import distmeta
File "/private/tmp/pip-install-rgmh5da6/stompy/stompy/__init__.py", line 1, in <module>
from stompy.stomp import Stomp, NotConnectedError
File "/private/tmp/pip-install-rgmh5da6/stompy/stompy/stomp.py", line 49
except socket.timeout, exc:
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-install-rgmh5da6/stompy/
您使用的是AWS Lambda。默认情况下不包括模块
stomp
。在您需要创建自己的部署包,包括
stomp
,如here所述。在相关问题 更多 >
编程相关推荐