1
votes

OS X version: 10.11.5 (El Capitan)

TensorFlow version: 9.0

After installing pip, I proceeded to install TensorFlow following the instructions under "Pip installation" from TensorFlow.org.

export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/tensorflow-0.9.0-py2-none-any.whl

then

sudo pip install --upgrade $TF_BINARY_URL

However, even though I copied and pasted the command, I received "URLError".

sudo pip install --upgrade $TF_BINARY_URL Downloading/unpacking https://storage.googleapis.com/tensorflow/mac/tensorflow-0.9.0-py2-none-any.whl Error while getting https://storage.googleapis.com/tensorflow/mac/tensorflow-0.9.0-py2-none-any.whl Exception: Traceback (most recent call last): File "/Users/user-name/anaconda/lib/python2.7/site-packages/pip/basecommand.py", line 139, in main status = self.run(options, args) File "/Users/user-name/anaconda/lib/python2.7/site-packages/pip/commands/install.py", line 266, in run requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) File "/Users/user-name/anaconda/lib/python2.7/site-packages/pip/req.py", line 1033, in prepare_files self.unpack_url(url, location, self.is_download) File "/Users/user-name/anaconda/lib/python2.7/site-packages/pip/req.py", line 1161, in unpack_url retval = unpack_http_url(link, location, self.download_cache, self.download_dir) File "/Users/user-name/anaconda/lib/python2.7/site-packages/pip/download.py", line 534, in unpack_http_url resp = _get_response_from_url(target_url, link) File "/Users/user-name/anaconda/lib/python2.7/site-packages/pip/download.py", line 569, in _get_response_from_url resp = urlopen(target_url) File "/Users/user-name/anaconda/lib/python2.7/site-packages/pip/download.py", line 143, in call response = self.get_opener(scheme=scheme).open(url) File "/Users/user-name/anaconda/lib/python2.7/urllib2.py", line 404, in open response = self._open(req, data) File "/Users/user-name/anaconda/lib/python2.7/urllib2.py", line 422, in _open '_open', req) File "/Users/user-name/anaconda/lib/python2.7/urllib2.py", line 382, in _call_chain result = func(*args) File "/Users/user-name/anaconda/lib/python2.7/site-packages/pip/download.py", line 123, in https_open return self.do_open(self.specialized_conn_class, req) File "/Users/user-name/anaconda/lib/python2.7/urllib2.py", line 1184, in do_open raise URLError(err) URLError: Storing complete log in /Users/user-name/.pip/pip.log

1
On the Tensor Flow website the url is different than what you posted. Have you tried using the url on the website? Also did you create the environment variable TF_BINARY_URL using the export command? - colelemonz
I tried to install Tensorflow 9.0 and 8.0, both gave me the same error. I just edited the post to reflect 9.0 installation instruction. Thanks - Sean
Strange; it seems to work for me. Are you able to successfully download that URL with "wget" or "curl"? I'm guessing something is strange about your network setup. Does anything interesting appear in the log (/Users/user-name/.pip/pip.log)? - Peter Hawkins
pip.log actually show the message above (behind Exception: "Traceback (most recent call last):" ) - Sean

1 Answers

0
votes

I found this post from Stackoverflow. The accepted answer suggested the cause of "urlopen error" may be the older version of python. After updating python from 2.7.5 to 2.7.12, the problem is solved.