简体   繁体   English

使用终端在Linux的ubuntu中安装twilio

[英]installing twilio in ubuntu in linux with terminal

I am trying to install twilio in my Ubuntu 16.04LTS. 我正在尝试在Ubuntu 16.04LTS中安装twilio。 however I am getting some error and was enable to import it. 但是我遇到一些错误,可以导入它。 the command lines I inserted is the following along with the error: 我插入的命令行以及错误信息如下:

trina@Trina-PC:~$ sudo easy_install twilio
[sudo] password for trina: 
Searching for twilio
Best match: twilio 6.4.1
Processing twilio-6.4.1-py2.7.egg
twilio 6.4.1 is already the active version in easy-install.pth

Using /usr/local/lib/python2.7/dist-packages/twilio-6.4.1-py2.7.egg
Processing dependencies for twilio
Searching for cryptography>=1.3.4
Reading https://pypi.python.org/simple/cryptography/
Best match: cryptography 1.9
Downloading https://pypi.python.org/packages/2a/0c/31bd69469e90035381f0197b48bf71032991d9f07a7e444c311b4a23a3df/cryptography-1.9.tar.gz#md5=1529f12fb403c9a0045277cb73df766c
Processing cryptography-1.9.tar.gz
Writing /tmp/easy_install-zvhL9Y/cryptography-1.9/setup.cfg
Running cryptography-1.9/setup.py -q bdist_egg --dist-dir /tmp/easy_install-zvhL9Y/cryptography-1.9/egg-dist-tmp-8YO7r3
no previously-included directories found matching 'docs/_build'
warning: no previously-included files matching '*' found under directory 'vectors'
build/temp.linux-x86_64-2.7/_openssl.c:434:30: fatal error: openssl/opensslv.h: No such file or directory
compilation terminated.
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

can you please tell me what's going wrong here 你能告诉我这是怎么回事吗

I suppose you need to install libffi-dev and libssl-dev lib to fix this problem. 我想您需要安装libffi-devlibssl-dev lib来解决此问题。 For Ubuntu user, run this command: 对于Ubuntu用户,运行以下命令:

apt-get install libffi-dev libssl-dev

For Centos user, try this: 对于Centos用户,请尝试以下操作:

yum install openssl-devel

Also you can try to install these dependencies, and then retry. 另外,您可以尝试安装这些依赖项,然后重试。

apt-get install python-openssl
apt-get install python-gmpy
apt-get install python-gmpy2

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

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