Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR on installing watson developer cloud #225

Closed
createsh opened this issue Jun 26, 2017 · 11 comments
Closed

ERROR on installing watson developer cloud #225

createsh opened this issue Jun 26, 2017 · 11 comments
Assignees
Labels

Comments

@createsh
Copy link

When I try
pip install --upgrade watson-developer-cloud
i get permission denied, so i tried
sudo pip install --upgrade watson-developer-cloud
then i get

Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-ibctMJ/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-_kHPhG-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-ibctMJ/cryptography/
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

I updated pip and setuptools to the newest version, but still doesn't work.
Any clue?

@blacknred0
Copy link

You first need to run sudo pip install --upgrade pip , then you can do sudo pip install watson-developer-cloud if this is your first time installing Watson Developer Cloud.

@createsh
Copy link
Author

@blacknred0 I tried sudo pip install --upgrade pip but nothing changed

@blacknred0
Copy link

@createsh and then you tried sudo pip install watson-developer-cloud?

@Dkilpatrick31
Copy link

Dkilpatrick31 commented Jul 8, 2017

I'm having the same issues as well. I followed your instructions blacknred0 and I'm now getting this error after i type in 'sudo pip install watson-developer-cloud'

OSError: [Errno 1] Operation not permitted: '/tmp/pip-sGIL81-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'

@germanattanasio
Copy link
Contributor

are you getting the same issue when you try to install other dependencies?

@deneganisme
Copy link

Using the latest version of pip and setuptools I get this error when trying to install the module:

UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
  cmdoptions.check_install_build_global(options)
Command "/home/ec2-user/miniconda2/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-WiK7Mp/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-F1d6QH-record/install-record.txt --single-version-externally-managed --compile --prefix= --home=/tmp/tmps9hp4T" failed with error code 1 in /tmp/pip-build-WiK7Mp/cffi/

@blacknred0
Copy link

@Dkilpatrick31 Apparently it seems an issue with a package called six v1.4.1. Here is a bug that might have resurface where one of the packages attempts to uninstall it, but it doesn't have the proper permission to do so. Here is more info if you would like -> Six issue when installing package #3165.

I just tested the install and went successfully with this command by ignoring the current six package with sudo -H pip install --ignore-installed six watson-developer-cloud.

Here is my env
Python 2.7.10
pip 9.0.1 from /Library/Python/2.7/site-packages (python 2.7)

Collecting six
  Downloading six-1.10.0-py2.py3-none-any.whl
Collecting watson-developer-cloud
  Downloading watson-developer-cloud-0.26.1.tar.gz (66kB)
    100% |████████████████████████████████| 71kB 267kB/s 
Collecting requests<3.0,>=2.0 (from watson-developer-cloud)
  Downloading requests-2.18.1-py2.py3-none-any.whl (88kB)
    100% |████████████████████████████████| 92kB 435kB/s 
Collecting pysolr<4.0,>=3.3 (from watson-developer-cloud)
  Downloading pysolr-3.6.0-py2.py3-none-any.whl
Collecting pyOpenSSL>=16.2.0 (from watson-developer-cloud)
  Downloading pyOpenSSL-17.1.0-py2.py3-none-any.whl (53kB)
    100% |████████████████████████████████| 61kB 763kB/s 
Collecting urllib3<1.22,>=1.21.1 (from requests<3.0,>=2.0->watson-developer-cloud)
  Downloading urllib3-1.21.1-py2.py3-none-any.whl (131kB)
    100% |████████████████████████████████| 133kB 632kB/s 
Collecting idna<2.6,>=2.5 (from requests<3.0,>=2.0->watson-developer-cloud)
  Downloading idna-2.5-py2.py3-none-any.whl (55kB)
    100% |████████████████████████████████| 61kB 797kB/s 
Collecting certifi>=2017.4.17 (from requests<3.0,>=2.0->watson-developer-cloud)
  Downloading certifi-2017.4.17-py2.py3-none-any.whl (375kB)
    100% |████████████████████████████████| 378kB 876kB/s 
Collecting chardet<3.1.0,>=3.0.2 (from requests<3.0,>=2.0->watson-developer-cloud)
  Downloading chardet-3.0.4-py2.py3-none-any.whl (133kB)
    100% |████████████████████████████████| 143kB 1.2MB/s 
Collecting cryptography>=1.9 (from pyOpenSSL>=16.2.0->watson-developer-cloud)
  Downloading cryptography-1.9-cp27-cp27m-macosx_10_6_intel.whl (1.5MB)
    100% |████████████████████████████████| 1.5MB 544kB/s 
Collecting ipaddress (from cryptography>=1.9->pyOpenSSL>=16.2.0->watson-developer-cloud)
  Downloading ipaddress-1.0.18-py2-none-any.whl
Collecting asn1crypto>=0.21.0 (from cryptography>=1.9->pyOpenSSL>=16.2.0->watson-developer-cloud)
  Downloading asn1crypto-0.22.0-py2.py3-none-any.whl (97kB)
    100% |████████████████████████████████| 102kB 1.9MB/s 
Collecting enum34 (from cryptography>=1.9->pyOpenSSL>=16.2.0->watson-developer-cloud)
  Downloading enum34-1.1.6-py2-none-any.whl
Collecting cffi>=1.7 (from cryptography>=1.9->pyOpenSSL>=16.2.0->watson-developer-cloud)
  Downloading cffi-1.10.0-cp27-cp27m-macosx_10_6_intel.whl (226kB)
    100% |████████████████████████████████| 235kB 1.7MB/s 
Collecting pycparser (from cffi>=1.7->cryptography>=1.9->pyOpenSSL>=16.2.0->watson-developer-cloud)
  Downloading pycparser-2.18.tar.gz (245kB)
    100% |████████████████████████████████| 256kB 1.5MB/s 
Building wheels for collected packages: watson-developer-cloud, pycparser
  Running setup.py bdist_wheel for watson-developer-cloud ... done
  Stored in directory: /var/root/Library/Caches/pip/wheels/4e/58/1a/77ae16667b7a0ff82fb3d7dd6c4c615ede8e469803f31f79a7
  Running setup.py bdist_wheel for pycparser ... done
  Stored in directory: /var/root/Library/Caches/pip/wheels/95/14/9a/5e7b9024459d2a6600aaa64e0ba485325aff7a9ac7489db1b6
Successfully built watson-developer-cloud pycparser
Installing collected packages: six, urllib3, idna, certifi, chardet, requests, pysolr, ipaddress, asn1crypto, enum34, pycparser, cffi, cryptography, pyOpenSSL, watson-developer-cloud
Successfully installed asn1crypto-0.22.0 certifi-2017.4.17 cffi-1.10.0 chardet-3.0.4 cryptography-1.9 enum34-1.1.6 idna-2.5 ipaddress-1.0.18 pyOpenSSL-17.1.0 pycparser-2.18 pysolr-3.6.0 requests-2.18.1 six-1.10.0 urllib3-1.21.1 watson-developer-cloud-0.26.1

@jsstylos
Copy link
Contributor

@createsh Did the advice from @blacknred0 solve your problem?

@germanattanasio
Copy link
Contributor

@ehdsouza can you try to reproduce this? If you can, write a PR to update the README with the proposed fix and a link to this issue

@gaoyukid
Copy link

gaoyukid commented Apr 17, 2018

looks like the same issue happens even with sudo -H pip install --ignore-installed six watson-developer-cloud

gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c src/twisted/test/raiser.c -o build/temp.linux-x86_64-2.7/src/twisted/test/raiser.o
src/twisted/test/raiser.c:4:20: fatal error: Python.h: No such file or directory
 #include "Python.h"
                    ^
compilation terminated.
error: command 'gcc' failed with exit status 1

----------------------------------------

Command "/usr/bin/python2 -u -c "import setuptools, tokenize;file='/tmp/pip-install-kNDN0u/Twisted/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-yGKXcN/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-kNDN0u/Twisted/
[yug@tea Python-2.7.14]$ python -V
Python 2.7.14
[yug@tea Python-2.7.14]$ pip -V
pip 10.0.0 from /usr/lib/python2.7/site-packages/pip (python 2.7)

@ironmantis7x
Copy link

Hi everyone. I am running into this same issue.
In the project directory where I have my python code I added the --user switch for the pip install command:

pip install --user --upgrade watson-developer-cloud

and the import appears to work.

I am having a new issue now after this:

site-packages/watson_developer_cloud/watson_service.py", line 472, in request
info=error_info, httpResponse=response)
watson_developer_cloud.watson_service.WatsonApiException: Error: Unauthorized: Access is denied due to invalid credentials , Code: 401 , Information: {u'description': u'2018-08-04T08:39:51-05:00, Error occurred when accessing https://gateway.watsonplatform.net/assistant/api/v1/workspaces/55280d91-9a0c-4078-a286-989ba33ca74c/message?version=2018-02-16, Tran-Id: gateway01-715049601 - '} , X-dp-watson-tran-id: gateway01-715049601

I have no idea what this is ...
Any ideas anyone??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

9 participants