I am using Ubuntu 14.04 and Python 3.5; I used pip install quandl to install quandl package. I am seeing below error.
on the other hand I tried below two methods:
download .whl package and provide path where .whl file is located. I am seeing same error as below.
Processing ./Documents/Quandl-3.2.0-py2.py3-none-any.whl
Collecting inflection>=0.3.1 (from Quandl==3.2.0)
Requirement already satisfied: requests<2.18,>=2.7.0 in /usr/lib/python3/dist-packages (from Quandl==3.2.0)
Requirement already satisfied: numpy>=1.8 in ./.local/lib/python3.5/site-packages (from Quandl==3.2.0)
Collecting more-itertools (from Quandl==3.2.0)
Using cached more_itertools-3.2.0-py3-none-any.whl
Requirement already satisfied: python-dateutil in /usr/lib/python3/dist-packages (from Quandl==3.2.0)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from Quandl==3.2.0)
Requirement already satisfied: pandas>=0.14 in /usr/lib/python3/dist-packages (from Quandl==3.2.0)
Installing collected packages: inflection, more-itertools, Quandl
Exception:
Traceback (most recent call last):
File "/home/rr/.local/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/rr/.local/lib/python3.5/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/home/rr/.local/lib/python3.5/site-packages/pip/req/req_set.py", line 784, in install
**kwargs
File "/home/rr/.local/lib/python3.5/site-packages/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/home/rr/.local/lib/python3.5/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/home/rr/.local/lib/python3.5/site-packages/pip/wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "/home/rr/.local/lib/python3.5/site-packages/pip/wheel.py", line 323, in clobber
shutil.copyfile(srcfile, destfile)
File "/usr/lib/python3.5/shutil.py", line 115, in copyfile
with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.5/dist-packages/inflection.py'
other method i tried is use sudo -apt get install python -3 quandl. While using this method I am seeing below error
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-quandl
For method 1: I am unable to understand why I am getting permission denied error message.
For method 2: Why is it not able to locate package?
I will appreciate any advice on these error messages and also any help in installing this package on python 3.5 in ubuntu 14.04.
Related
New to programming. Installed Anaconda on a Windows 10 machine. Had some issues running updates.
While in Base environment, I installed my first Git repo successfully:
(base) C:\Users\samsung\Anaconda3\pkgs>pip install git+git://github.com/json-transformations/jsonflatten.git
Collecting git+git://github.com/json-transformations/jsonflatten.git
Cloning git://github.com/json-transformations/jsonflatten.git to c:\users\samsung\appdata\local\temp\pip-req-build-zeiezw
Running command git clone -q git://github.com/json-transformations/jsonflatten.git 'C:\Users\samsung\AppData\Local\Temp\p
Collecting jsoncut
Downloading jsoncut-0.6-py2.py3-none-any.whl (17 kB)
Requirement already satisfied: click>=6.0 in c:\users\samsung\anaconda3\lib\site-packages (from jsonflatten==0.2) (7.0)
Requirement already satisfied: colorama in c:\users\samsung\anaconda3\lib\site-packages (from jsoncut->jsonflatten==0.2) (0
Requirement already satisfied: pygments in c:\users\samsung\anaconda3\lib\site-packages (from jsoncut->jsonflatten==0.2) (2
Building wheels for collected packages: jsonflatten
Building wheel for jsonflatten (setup.py) ... done
Created wheel for jsonflatten: filename=jsonflatten-0.2-py2.py3-none-any.whl size=8116 sha256=029aafde944303cbfe872e86a13
Stored in directory: C:\Users\samsung\AppData\Local\Temp\pip-ephem-wheel-cache-so8173tt\wheels\8f\02\52\37295acfd1368a3d2
Successfully built jsonflatten
Installing collected packages: jsoncut, jsonflatten
Successfully installed jsoncut-0.6 jsonflatten-0.2
(base) C:\Users\samsung\Anaconda3\pkgs>pip install jsonflatten
Requirement already satisfied: jsonflatten in c:\users\samsung\anaconda3\lib\site-packages (0.2)
Requirement already satisfied: click>=6.0 in c:\users\samsung\anaconda3\lib\site-packages (from jsonflatten) (7.0)
Requirement already satisfied: jsoncut in c:\users\samsung\anaconda3\lib\site-packages (from jsonflatten) (0.6)
Requirement already satisfied: pygments in c:\users\samsung\anaconda3\lib\site-packages (from jsoncut->jsonflatten) (2.5.2)
Requirement already satisfied: colorama in c:\users\samsung\anaconda3\lib\site-packages (from jsoncut->jsonflatten) (0.4.3)
I then ran jsonflatten forecast.json as a test (as well as jsonflatten C:\Users\samsung.spyder-py3\forecast.json) as the readme suggests and got the output below. I ran from base as myenv (Python) spit out a message saying jsonflatten is not recognized as a command.
(base) C:\Users\samsung\.spyder-py3>jsonflatten C:\Users\samsung\.spyder-py3\forecast.json
Traceback (most recent call last):
File "c:\users\samsung\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\samsung\anaconda3\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\samsung\Anaconda3\Scripts\jsonflatten.exe\__main__.py", line 7, in <module>
File "c:\users\samsung\anaconda3\lib\site-packages\click\core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "c:\users\samsung\anaconda3\lib\site-packages\click\core.py", line 717, in main
rv = self.invoke(ctx)
File "c:\users\samsung\anaconda3\lib\site-packages\click\core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\users\samsung\anaconda3\lib\site-packages\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "c:\users\samsung\anaconda3\lib\site-packages\click\decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "c:\users\samsung\anaconda3\lib\site-packages\jsonflatten\cli.py", line 63, in main
output(ctx, results, indent=4, is_json=True)
File "c:\users\samsung\anaconda3\lib\site-packages\jsoncut\cli.py", line 59, in output
output = highlighter.highlight_json(output)
File "c:\users\samsung\anaconda3\lib\site-packages\jsoncut\highlighter.py", line 53, in highlight_json
return pygments.highlight(d, JsonLexer(), formatter)
File "c:\users\samsung\anaconda3\lib\site-packages\pygments\__init__.py", line 85, in highlight
return format(lex(code, lexer), formatter, outfile)
File "c:\users\samsung\anaconda3\lib\site-packages\pygments\__init__.py", line 64, in format
formatter.format(tokens, realoutfile)
File "c:\users\samsung\anaconda3\lib\site-packages\pygments\formatters\terminal.py", line 101, in format
return Formatter.format(self, tokensource, outfile)
File "c:\users\samsung\anaconda3\lib\site-packages\pygments\formatter.py", line 95, in format
return self.format_unencoded(tokensource, outfile)
File "c:\users\samsung\anaconda3\lib\site-packages\pygments\formatters\terminal.py", line 126, in format_unencoded
outfile.write(ansiformat(color, line.rstrip('\n')))
File "c:\users\samsung\anaconda3\lib\site-packages\pygments\console.py", line 68, in ansiformat
result.append(codes[attr])
KeyError: 'darkgray'
There is a guide for troubleshooting software in Anaconda: https://www.anaconda.com/what-to-do-when-things-go-wrong-in-anaconda/ but this is a brand-new install.
Does this look like an Anaconda issue, an issue with how I am running the software or an issue with the software itself?
You're getting an error in site-packages with a module that is a dependency of something that you've installed.
Anaconda is just a distribtion, not the runtime.
The problem is from Python's pygments\console.py module, which is likely responsible for coloring the output of your jsonflatten module.
Try to see if there is a CLI flag to not colorize stuff, or don't use jsonflatten and rather use python's json.tool or separately install jq instead. (not saying those offer what you need, but they also parse JSON on the CLI)
I have Pandas version 0.24.1 on Python2 :
Python version:
[user#localhost ~]$ python -V
Python 2.7.13
Pandas version:
>>> import pandas
>>> pandas.__version__
u'0.24.1'
but need to upgrade Pandas for Python3. I have tried to update Pandas using on the Linux terminal using:
pip3 install --upgrade pandas
However the following error was returned:
[user#localhost ~]$ pip3 install --upgrade pandas
Collecting pandas
Using cached https://files.pythonhosted.org/packages/e6/de/a0d3defd8f338eaf53ef716e40ef6d6c277c35d50e09b586e170169cdf0d/pandas-0.24.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting python-dateutil>=2.5.0 (from pandas)
Using cached https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl
Collecting pytz>=2011k (from pandas)
Using cached https://files.pythonhosted.org/packages/61/28/1d3920e4d1d50b19bc5d24398a7cd85cc7b9a75a490570d5a30c57622d34/pytz-2018.9-py2.py3-none-any.whl
Collecting numpy>=1.12.0 (from pandas)
Using cached https://files.pythonhosted.org/packages/f5/bf/4981bcbee43934f0adb8f764a1e70ab0ee5a448f6505bd04a87a2fda2a8b/numpy-1.16.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting six>=1.5 (from python-dateutil>=2.5.0->pandas)
Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Installing collected packages: six, python-dateutil, pytz, numpy, pandas
Found existing installation: six 1.11.0
Uninstalling six-1.11.0:
Exception:
Traceback (most recent call last):
File "/usr/lib64/python3.6/shutil.py", line 544, in move
os.rename(src, real_dst)
OSError: [Errno 18] Invalid cross-device link: '/usr/lib/python3.6/site-packages/__pycache__/six.cpython-36.pyc' -> '/tmp/pip-mq4rdaea-uninstall/usr/lib/python3.6/site-packages/__pycache__/six.cpython-36.pyc'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python3.6/site-packages/pip/commands/install.py", line 365, in run
strip_file_prefix=options.strip_file_prefix,
File "/usr/lib/python3.6/site-packages/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "/usr/lib/python3.6/site-packages/pip/req/req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "/usr/lib/python3.6/site-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/usr/lib/python3.6/site-packages/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/usr/lib64/python3.6/shutil.py", line 559, in move
os.unlink(src)
PermissionError: [Errno 13] Permission denied: '/usr/lib/python3.6/site-packages/__pycache__/six.cpython-36.pyc'
I then tried : python3 -m pip install pandas
and received the same type of error:
[user#localhost ~]$ python3 -m pip install pandas
Collecting pandas
Using cached https://files.pythonhosted.org/packages/e6/de/a0d3defd8f338eaf53ef716e40ef6d6c277c35d50e09b586e170169cdf0d/pandas-0.24.1-cp36-cp36m-manylinux1_x86_64.whl
Requirement already satisfied: pytz>=2011k in /usr/lib/python3.6/site-packages (from pandas)
Collecting numpy>=1.12.0 (from pandas)
Using cached https://files.pythonhosted.org/packages/f5/bf/4981bcbee43934f0adb8f764a1e70ab0ee5a448f6505bd04a87a2fda2a8b/numpy-1.16.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting python-dateutil>=2.5.0 (from pandas)
Using cached https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl
Requirement already satisfied: six>=1.5 in /usr/lib/python3.6/site-packages (from python-dateutil>=2.5.0->pandas)
Installing collected packages: numpy, python-dateutil, pandas
Exception:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python3.6/site-packages/pip/commands/install.py", line 365, in run
strip_file_prefix=options.strip_file_prefix,
File "/usr/lib/python3.6/site-packages/pip/req/req_set.py", line 784, in install
**kwargs
File "/usr/lib/python3.6/site-packages/pip/req/req_install.py", line 854, in install
strip_file_prefix=strip_file_prefix
File "/usr/lib/python3.6/site-packages/pip/req/req_install.py", line 1069, in move_wheel_files
strip_file_prefix=strip_file_prefix,
File "/usr/lib/python3.6/site-packages/pip/wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "/usr/lib/python3.6/site-packages/pip/wheel.py", line 316, in clobber
ensure_dir(destdir)
File "/usr/lib/python3.6/site-packages/pip/utils/__init__.py", line 83, in ensure_dir
os.makedirs(path)
File "/usr/lib64/python3.6/os.py", line 220, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/usr/local/lib64/python3.6/site-packages/numpy'
How can I upgrade pandas?
I am trying to run following command:
pip install boto3
It looks like is start downloading and then show errors:
Collecting boto3
Downloading boto3-1.6.11-py2.py3-none-any.whl (128kB)
100% |████████████████████████████████| 133kB 2.7MB/s
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /Library/Python/2.7/site-packages (from boto3)
Collecting botocore<1.10.0,>=1.9.11 (from boto3)
Downloading botocore-1.9.11-py2.py3-none-any.whl (4.1MB)
100% |████████████████████████████████| 4.1MB 278kB/s
Collecting s3transfer<0.2.0,>=0.1.10 (from boto3)
Using cached s3transfer-0.1.13-py2.py3-none-any.whl
Collecting python-dateutil<2.7.0,>=2.1 (from botocore<1.10.0,>=1.9.11->boto3)
Using cached python_dateutil-2.6.1-py2.py3-none-any.whl
Collecting docutils>=0.10 (from botocore<1.10.0,>=1.9.11->boto3)
Using cached docutils-0.14-py2-none-any.whl
Requirement already satisfied: futures<4.0.0,>=2.2.0; python_version == "2.6" or python_version == "2.7" in /Library/Python/2.7/site-packages (from s3transfer<0.2.0,>=0.1.10->boto3)
Collecting six>=1.5 (from python-dateutil<2.7.0,>=2.1->botocore<1.10.0,>=1.9.11->boto3)
Using cached six-1.11.0-py2.py3-none-any.whl
Installing collected packages: six, python-dateutil, docutils, botocore, s3transfer, boto3
Found existing installation: six 1.4.1
DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling six-1.4.1:
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
copy2(src, real_dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
copystat(src, dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/var/folders/12/8qvv2_x53rz6ww3t22j2qbr80000gn/T/pip-E6G8ue-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
This is recently start happening.
How to troubleshoot from here?
Do I need to reinstall something and what is recommended way to use PIP?
I have tried using sudo easy_install sqlalchemy, pip install sqlalchemy and pip install flask-sqlalchemy. I have also tried installing and uninstalling sqlalchemy and flask. I get the error
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 267, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/home/j/Downloads/ng-website-master/venv/local/lib/python2.7/site-packages/hupper/worker.py", line 264, in worker_main
func(*spec_args, **spec_kwargs)
File "/home/j/Downloads/ng-website-master/venv/local/lib/python2.7/site-packages/pyramid/scripts/pserve.py", line 40, in main
return command.run()
File "/home/j/Downloads/ng-website-master/venv/local/lib/python2.7/site-packages/pyramid/scripts/pserve.py", line 222, in run
app_spec, name=app_name, relative_to=base, global_conf=vars)
File "/home/j/Downloads/ng-website-master/venv/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
return loadobj(APP, uri, name=name, **kw)
File "/home/j/Downloads/ng-website-master/venv/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
return context.create()
File "/home/j/Downloads/ng-website-master/venv/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
return self.object_type.invoke(self)
File "/home/j/Downloads/ng-website-master/venv/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 146, in invoke
return fix_call(context.object, context.global_conf, **context.local_conf)
File "/home/j/Downloads/ng-website-master/venv/local/lib/python2.7/site-packages/paste/deploy/util.py", line 55, in fix_call
val = callable(*args, **kw)
File "/home/j/Downloads/ng-website-master/ngse/__init__.py", line 15, in main
config.include('.models')
File "/home/j/Downloads/ng-website-master/venv/local/lib/python2.7/site-packages/pyramid/config/__init__.py", line 776, in include
c = self.maybe_dotted(callable)
File "/home/j/Downloads/ng-website-master/venv/local/lib/python2.7/site-packages/pyramid/config/__init__.py", line 876, in maybe_dotted
return self.name_resolver.maybe_resolve(dotted)
File "/home/j/Downloads/ng-website-master/venv/local/lib/python2.7/site-packages/pyramid/path.py", line 320, in maybe_resolve
return self._resolve(dotted, package)
File "/home/j/Downloads/ng-website-master/venv/local/lib/python2.7/site-packages/pyramid/path.py", line 327, in _resolve
return self._zope_dottedname_style(dotted, package)
File "/home/j/Downloads/ng-website-master/venv/local/lib/python2.7/site-packages/pyramid/path.py", line 382, in _zope_dottedname_style
__import__(used)
File "/home/j/Downloads/ng-website-master/ngse/models/__init__.py", line 4, in <module>
import zope.sqlalchemy
ImportError: No module named sqlalchemy
Even after trying to upgrade sqlalchemy, I get the above error have.
Requirement already up-to-date: sqlalchemy in ./venv/lib/python2.7/site-packages
Tried upgrading flask-sqlalchemy,still get the same error
Requirement already up-to-date: flask-sqlalchemy in ./venv/lib/python2.7/site-packages
Requirement already up-to-date: SQLAlchemy>=0.8.0 in ./venv/lib/python2.7/site-packages (from flask-sqlalchemy)
Requirement already up-to-date: Flask>=0.10 in ./venv/lib/python2.7/site-packages (from flask-sqlalchemy)
Requirement already up-to-date: itsdangerous>=0.21 in ./venv/lib/python2.7/site-packages (from Flask>=0.10->flask-sqlalchemy)
Requirement already up-to-date: Jinja2>=2.4 in ./venv/lib/python2.7/site-packages (from Flask>=0.10->flask-sqlalchemy)
Requirement already up-to-date: Werkzeug>=0.7 in ./venv/lib/python2.7/site-packages (from Flask>=0.10->flask-sqlalchemy)
Requirement already up-to-date: click>=2.0 in ./venv/lib/python2.7/site-packages (from Flask>=0.10->flask-sqlalchemy)
Requirement already up-to-date: MarkupSafe>=0.23 in ./venv/lib/python2.7/site-packages (from Jinja2>=2.4->Flask>=0.10->flask-sqlalchemy)
I am trying to install use sqlalchemy inside a virtualenv. I also have python=2.7.14, pip=9.0.1, setuptools=38.2.5 and the supposed installed sqlalchemy=1.2.0. I used supposed because when I try upgrading and checking the version of sqlalchemy and flask-sqlalchemy, my computer shows that it's installed but I can't use it.
Here's what I get when I print out sys.path
['', '/usr/lib/python2.7',
'/usr/lib/python2.7/plat-x86_64-linux-gnu',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/home/j/.local/lib/python2.7/site-packages', '/usr/local/lib/python2.7/dist-packages',
'/usr/local/lib/python2.7/dist-packages/MySQL_python-1.2.5-py2.7-linux-x86_64.egg',
'/usr/local/lib/python2.7/dist-packages/SQLAlchemy-1.2.0-py2.7-linux-x86_64.egg',
'/usr/lib/python2.7/dist-packages']
Please help me. I don't know what else to do
You're pip install is wrong.
Change sqalchemy to sqlalchemy so it is:
pip install sqlalchemy
And make sure to do so within the activated virtualenv.
I get the same error as you.
I solved it with:
I remove my virtrualenv, and create a new one
run pip3 install -r requirment.text install of sudo pip3 install -r requirment.text (if above command get permission denied error, you should run sudo chown -R user /usr/local/lib/python3.6/)
Many thanks for reading this.
I tried searching but could not find an answer to this.
I have been trying to install tensorflow using pip on Windows 8.1 using python 3.5.2. I get this error.
C:\Users\Default.HP>pip3 install --upgrade tensorflow
Collecting tensorflow
Using cached tensorflow-1.0.1-cp35-cp35m-win_amd64.whl
Collecting numpy>=1.11.0 (from tensorflow)
Using cached numpy-1.12.0-cp35-none-win_amd64.whl
Collecting six>=1.10.0 (from tensorflow)
Using cached six-1.10.0-py2.py3-none-any.whl
Collecting protobuf>=3.1.0 (from tensorflow)
Using cached protobuf-3.2.0-py2.py3-none-any.whl
Collecting wheel>=0.26 (from tensorflow)
Using cached wheel-0.29.0-py2.py3-none-any.whl
Collecting setuptools (from protobuf>=3.1.0->tensorflow)
Using cached setuptools-34.3.2-py2.py3-none-any.whl
Collecting appdirs>=1.4.0 (from setuptools->protobuf>=3.1.0->tensorflow)
Using cached appdirs-1.4.3-py2.py3-none-any.whl
Collecting packaging>=16.8 (from setuptools->protobuf>=3.1.0->tensorflow)
Using cached packaging-16.8-py2.py3-none-any.whl
Collecting pyparsing (from packaging>=16.8->setuptools->protobuf>=3.1.0->tensorf
low)
Using cached pyparsing-2.2.0-py2.py3-none-any.whl
Installing collected packages: numpy, six, appdirs, pyparsing, packaging, setupt
ools, protobuf, wheel, tensorflow
Exception:
Traceback (most recent call last):
File "c:\program files\python35\lib\site-packages\pip\basecommand.py", line 20
9, in main
status = self.run(options, args)
File "c:\program files\python35\lib\site-packages\pip\commands\install.py", li
ne 317, in run prefix=options.prefix_path,
File "c:\program files\python35\lib\site-packages\pip\req\req_set.py", line 73
2, in install
**kwargs
File "c:\program files\python35\lib\site-packages\pip\req\req_install.py", lin
e 835, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "c:\program files\python35\lib\site-packages\pip\req\req_install.py", lin
e 1030, in move_wheel_files isolated=self.isolated,
File "c:\program files\python35\lib\site-packages\pip\wheel.py", line 344, in
move_wheel_files
clobber(source, lib_dir, True)
File "c:\program files\python35\lib\site-packages\pip\wheel.py", line 315, in
clobber
ensure_dir(destdir)
File "c:\program files\python35\lib\site-packages\pip\utils\__init__.py", line
83, in ensure_dir
os.makedirs(path)
File "c:\program files\python35\lib\os.py", line 241, in makedirs
mkdir(name, mode)
PermissionError: [WinError 5] Access is denied: 'c:\\program files\\python35\\Li
b\\site-packages\\numpy'
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' comm
and.
When trying to upgrade pip, I then get this error
C:\Users\Default.HP>python -m pip install --upgrade pip
Collecting pip
Using cached pip-9.0.1-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 8.1.1
Uninstalling pip-8.1.1:
Exception:
Traceback (most recent call last):
File "C:\Program Files\Python35\lib\shutil.py", line 538, in move
os.rename(src, real_dst)
PermissionError: [WinError 5] Access is denied: 'c:\\program files\\python35\\li
b\\site-packages\\pip-8.1.1.dist-info\\description.rst' -> 'C:\\Users\\Default.H
P\\AppData\\Local\\Temp\\pip-0fd55_is-uninstall\\program files\\python35\\lib\\s
ite-packages\\pip-8.1.1.dist-info\\description.rst'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files\Python35\lib\site-packages\pip\basecommand.py", line 20
9, in main
status = self.run(options, args)
File "C:\Program Files\Python35\lib\site-packages\pip\commands\install.py", li
ne 317, in run
prefix=options.prefix_path,
File "C:\Program Files\Python35\lib\site-packages\pip\req\req_set.py", line 72
6, in install
requirement.uninstall(auto_confirm=True)
File "C:\Program Files\Python35\lib\site-packages\pip\req\req_install.py", lin
e 746, in uninstall
paths_to_remove.remove(auto_confirm)
File "C:\Program Files\Python35\lib\site-packages\pip\req\req_uninstall.py", l
ine 115, in remove
renames(path, new_path)
File "C:\Program Files\Python35\lib\site-packages\pip\utils\__init__.py", line
267, in renames
shutil.move(old, new)
File "C:\Program Files\Python35\lib\shutil.py", line 553, in move
os.unlink(src)
PermissionError: [WinError 5] Access is denied: 'c:\\program files\\python35\\li
b\\site-packages\\pip-8.1.1.dist-info\\description.rst'
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' comm
and.
How can this be solved?
Many thanks.
This permission error arises when pip (running as a non-Administrator user) tries to upgrade a package that was installed by an Administrator user. There are two main workarounds:
Run the upgrade command using an Administrator command prompt.
Install TensorFlow into a virtualenv owned by the non-Administrator user.
For me the issue was with my internet connection.
Had lots of slide interruptions which would stop the process and trow those Exceptions.
So summary, Run the terminal as admin and make sure you have no network interruption during the download process.