Python Forum

Full Version: Ubuntu: Error installing watson-developer-cloud Python module
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All,
I have installed Python 2.7.14 and 3.6.3 on Ubuntu 17.10

I would like to install the module watson-developer-clod but I receive these errors.
Command
pip install --upgrade watson-developer-cloud
Error:
build/lib.linux-x86_64-3.6/twisted/python/test running build_ext building 'twisted.test.raiser' extension creating build/temp.linux-x86_64-3.6 creating build/temp.linux-x86_64-3.6/src creating build/temp.linux-x86_64-3.6/src/twisted creating build/temp.linux-x86_64-3.6/src/twisted/test x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-sXpGnM/python3.6-3.6.3=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c src/twisted/test/raiser.c -o build/temp.linux-x86_64-3.6/src/twisted/test/raiser.o src/twisted/test/raiser.c:4:10: fatal error: Python.h: File o directory non esistente #include "Python.h" ^~~~~~~~~~ compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 ---------------------------------------- Failed building wheel for Twisted Running setup.py clean for Twisted Successfully built watson-developer-cloud Failed to build Twisted Installing collected packages: six, attrs, Automat, constantly, idna, hyperlink, incremental, setuptools, zope.interface, Twisted, txaio, autobahn, asn1crypto, pycparser, cffi, cryptography, pyOpenSSL, python-dateutil, urllib3, certifi, requests, pyasn1, pyasn1-modules, service-identity, watson-developer-cloud Found existing installation: six 1.10.0 Uninstalling six-1.10.0: Exception: Traceback (most recent call last): File "/usr/lib/python3.6/shutil.py", line 544, in move os.rename(src, real_dst) PermissionError: [Errno 13] Permesso negato: '/usr/lib/python3/dist-packages/__pycache__/six.cpython-36.pyc' -> '/tmp/pip-05m20ciy-uninstall/usr/lib/python3/dist-packages/__pycache__/six.cpython-36.pyc'
Any help will be greatly appreciated.
Thanks in advance for your kind support.
Regards,
Giovanni
PermissionError means you need to add sudo

python2.x
sudo pip install --upgrade watson-developer-cloud
python3.x
sudo pip3 install --upgrade watson-developer-cloud
Hi Metulburr,
Thank you for your quick reply. I have executed both commands but I got the same error. I have attched the complete log.
Error:
#include "Python.h" ^~~~~~~~~~ compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Thanks in advace for your kind help.
Regards,
Giovanni
Hi All,
I have solved.

sudo apt-get install python-dev
then
sudo pip install --upgrade watson-developer-cloud