Closed JethroNCIS closed 6 years ago
Based on my testing, the distribute file is available. Can you please copy the full traceback into a comment here, so that I can examine it more fully?
Hi Aaron,
thanks for getting back to me so quickly. Which version of Mac OS do you have success with? (My version is 10.9.5, which did work to install annotald a year or so ago, but on another machine. I am sticking to 10.9.5 so I can run EXMARaLDA which we use for transcribing our Swiss-German data. I have run into problems using EXMARaLDA with newer version of Mac OS.)
Here is what happens when I try to install annotald
All the best,
Manuela.
sudo pip2 install annotald
The directory '/Users/projet/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/projet/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 annotald
Downloading annotald-1.3.8-py2.py3-none-any.whl (196kB)
100% |████████████████████████████████| 204kB 2.1MB/s
Collecting cherrypy (from annotald)
Downloading CherryPy-12.0.1-py2.py3-none-any.whl (429kB)
100% |████████████████████████████████| 430kB 1.7MB/s
Collecting nltk==2.0.5 (from annotald)
Downloading nltk-2.0.5.tar.gz (954kB)
100% |████████████████████████████████| 962kB 1.0MB/s
Complete output from command python setup.py egg_info:
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.21.tar.gz
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/tmp/pip-build-cGcBUx/nltk/setup.py", line 23, in <module>
distribute_setup.use_setuptools()
File "distribute_setup.py", line 145, in use_setuptools
return _do_download(version, download_base, to_dir, download_delay)
File "distribute_setup.py", line 124, in _do_download
to_dir, download_delay)
File "distribute_setup.py", line 193, in download_setuptools
src = urlopen(url)
File "/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response)
File "/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 473, in error
return self._call_chain(*args)
File "/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 556, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 403: SSL is required
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-cGcBUx/nltk/
MacBook-Pro-de-Admlettres:~ projet$
The problem arises because recently the python website was changed not to allow unsecured HTTP requests (only secured HTTPS ones). But, an old version of pip still wants to use the unsecured requests.
As a workaround, you should be able to do:
sudo pip install annotald -i https://pypi.python.org/simple/
The -i and following URL tell pip to use the secure installation. Let me know if this works for you!
I tried your suggestion, but it does not appear to work. Here is the copy of the extract from running it in the terminal window. It seems to make an unsecured request still.
MacBook-Pro-de-Admlettres:~ projet$ sudo pip2 install annotald -i https://pypi.python.org/simple/
The directory '/Users/projet/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/projet/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 annotald
Downloading annotald-1.3.8-py2.py3-none-any.whl (196kB)
100% |████████████████████████████████| 204kB 1.9MB/s
Collecting cherrypy (from annotald)
Downloading CherryPy-12.0.1-py2.py3-none-any.whl (429kB)
100% |████████████████████████████████| 430kB 1.6MB/s
Collecting mako (from annotald)
Downloading Mako-1.0.7.tar.gz (564kB)
100% |████████████████████████████████| 573kB 1.5MB/s
Collecting argparse (from annotald)
Downloading argparse-1.4.0-py2.py3-none-any.whl
Collecting nltk==2.0.5 (from annotald)
Downloading nltk-2.0.5.tar.gz (954kB)
100% |████████████████████████████████| 962kB 1.0MB/s
Complete output from command python setup.py egg_info:
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.21.tar.gz
Traceback (most recent call last):
File "
Hmm. You may have to install a newer version of pip. Try the instructions from https://pip.pypa.io/en/stable/installing/, under "Installing with get-pip.py". (You'll need to use sudo
)
I (well, my partner) updated python to 2.7.14 and pip to 9.0.1: projet$ python -V Python 2.7.14 projet$ pip -V pip 9.0.1 from /usr/local/lib/python2.7/site-packages (python 2.7)
However the annotald install fails just as before. I added --log on pip and this shows that indeed the https connections are being made for all components until distribute. Then it seems setuptools is requesting http not https: here is the extract showing a https call, and then the failure when an http request is made,
(cut)
Using version 2.0.5 (newest of versions: 2.0.5)
Using cached nltk-2.0.5.tar.gz
Downloading from URL https://pypi.python.org/packages/50/9e/39418026bf8013bbc2852c7aec3fb21e4339f6cd694934496d67a19b53b8/nlt\
k-2.0.5.tar.gz#md5=c3f77cc1bf6c6bc85db6629b7d23c3b9 (from https://pypi.python.org/simple/nltk/)
Running setup.py (path:/private/var/folders/6n/8svv1r0x395bky86r697sk7w0000gn/T/pip-build-3OgSNr/nltk/setup.py) egg_info for\
package nltk
Running command python setup.py egg_info
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.21.tar.gz
Traceback (most recent call last):
File "
(cut)
Does this mean it is the setup.py file that has a hard coded http rather than https? We do not know enough python to know what to do next. Is there some way to pass the https url into setup.py?
Thanks,
Manuela
P.S. It still fails trying to do this http download of distribute-0.6.21 even if that has been installed explicitly via pip install distribute==0.6.21. (That appears to work).
On Mac, I've come to the following solution:
General:
ANNOTALD:
Create virtual environment: virtualenv annotald
Activate it: source annotald/bin/activate
Download nltk 2.0.5: https://files.pythonhosted.org/packages/50/9e/39418026bf8013bbc2852c7aec3fb21e4339f6cd694934496d67a19b53b8/nltk-2.0.5.tar.gz
sudo pip install distribute
sudo pip install nose tornado
sudo pip install PyYAML
sudo pip install six==1.11.0 --ignore-installed
NLTK [in its unpacked folder]:
sudo pip install annotald
Work sessions:
I believe that the latest version of annotald (1.3.10, released today) solves these problems. Please let me know if this is not the case. Thanks.
I fail to install annotald because it appears distribute-0.6.21 is not available.
I have tried this several times with and without sudo on several different laptops running Mac OSX 10.9. In April 2016 I did successfully install annotald under 10.9. Any advice would be welcome. Thanks!