I have installed Python 3.4.1 on Windows 7, pip included and during install have selected add python.exe to PATH.
When running pip install requests I get:
C:\Python34>pip install requests
Requirement already satisfied (use --upgrade to upgrade): requests in c:\python3
4\lib\site-packages
Cleaning up...
Exception:
Traceback (most recent call last):
File "C:\Python34\lib\shutil.py", line 370, in _rmtree_unsafe
os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\User\\AppData\\Local
\\Temp\\pip_build_User\\pip\\pip\\_vendor\\distlib\\w32.exe'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\Python34\lib\site-packages\pip\commands\install.py", line 302, in run
requirement_set.cleanup_files(bundle=self.bundle)
File "C:\Python34\lib\site-packages\pip\req.py", line 1333, in cleanup_files
rmtree(dir)
File "C:\Python34\lib\site-packages\pip\util.py", line 43, in rmtree
onerror=rmtree_errorhandler)
File "C:\Python34\lib\shutil.py", line 477, in rmtree
return _rmtree_unsafe(path, onerror)
File "C:\Python34\lib\shutil.py", line 367, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Python34\lib\shutil.py", line 367, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Python34\lib\shutil.py", line 367, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Python34\lib\shutil.py", line 367, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Python34\lib\shutil.py", line 372, in _rmtree_unsafe
onerror(os.unlink, fullname, sys.exc_info())
File "C:\Python34\lib\site-packages\pip\util.py", line 53, in rmtree_errorhand
ler
(exctype is PermissionError and value.args[3] == 5) #python3.3
IndexError: tuple index out of range
Storing debug log for failure in C:\Users\User\pip\pip.log
When running pip install beautifulsoup4 I get:
C:\Python34>pip install beautifulsoup4
Downloading/unpacking beautifulsoup4
Running setup.py (path:C:\Users\User\AppData\Local\Temp\pip_build_User\beautif
ulsoup4\setup.py) egg_info for package beautifulsoup4
Installing collected packages: beautifulsoup4
Running setup.py install for beautifulsoup4
Skipping implicit fixer: buffer
Skipping implicit fixer: idioms
Skipping implicit fixer: set_literal
Skipping implicit fixer: ws_comma
Successfully installed beautifulsoup4
Cleaning up...
Exception:
Traceback (most recent call last):
File "C:\Python34\lib\shutil.py", line 370, in _rmtree_unsafe
os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\User\\AppData\\Local
\\Temp\\pip_build_User\\pip\\pip\\_vendor\\distlib\\w32.exe'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\Python34\lib\site-packages\pip\commands\install.py", line 302, in run
requirement_set.cleanup_files(bundle=self.bundle)
File "C:\Python34\lib\site-packages\pip\req.py", line 1333, in cleanup_files
rmtree(dir)
File "C:\Python34\lib\site-packages\pip\util.py", line 43, in rmtree
onerror=rmtree_errorhandler)
File "C:\Python34\lib\shutil.py", line 477, in rmtree
return _rmtree_unsafe(path, onerror)
File "C:\Python34\lib\shutil.py", line 367, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Python34\lib\shutil.py", line 367, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Python34\lib\shutil.py", line 367, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Python34\lib\shutil.py", line 367, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Python34\lib\shutil.py", line 372, in _rmtree_unsafe
onerror(os.unlink, fullname, sys.exc_info())
File "C:\Python34\lib\site-packages\pip\util.py", line 53, in rmtree_errorhand
ler
(exctype is PermissionError and value.args[3] == 5) #python3.3
IndexError: tuple index out of range
Storing debug log for failure in C:\Users\User\pip\pip.log
C:\Python34>
I am wondering what those Exceptions mean?
Have the packages really successfully installed like given in the log and will they run fine or am I doing something wrong.
Why the exceptions and how do I get rid of them?
All the permission exceptions means that your command prompt has no administrator rights.
Run the command prompt as Administrator (search for cmd in start menu, right click, Run as Administrator). If that doesn't work, try reinstalling pip; the file permissions things might have been screwed up somehow.
Related
Hi I am trying to install tensorflow with Anaconda . I am following the instruction from the official site:
https://www.tensorflow.org/install/install_windows
conda create -n tensorflow pip python=3.5
activate tensorflow
(tensorflow) C:\Users\guar8001>pip install tensorflow
I am getting the following error:
(tensorflow) C:\Users\guar8001>pip install tensorflow
Collecting tensorflow
Using cached tensorflow-1.7.0-cp35-cp35m-win_amd64.whl
Exception:
Traceback (most recent call last):
File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\shutil.py", line 391, in _rmtree_unsafe
os.rmdir(path)
OSError: [WinError 145] The directory is not empty: 'C:\\Users\\guar8001\\AppData\\Local\\Temp\\pip-install-fkfkeii_\\tensorflow\\tensorflow-1.7.0.data\\purelib\\tensorflow\\python'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\site-packages\pip\_internal\basecommand.py", line 228, in main
status = self.run(options, args)
File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\site-packages\pip\_internal\commands\install.py", line 388, in run
wheel_cache.cleanup()
File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\site-packages\pip\_internal\utils\temp_dir.py", line 58, in __exit__
self.cleanup()
File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\site-packages\pip\_internal\utils\temp_dir.py", line 81, in cleanup
rmtree(self.path)
File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\site-packages\pip\_vendor\retrying.py", line 49, in wrapped_f
return Retrying(*dargs, **dkw).call(f, *args, **kw)
File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\site-packages\pip\_vendor\retrying.py", line 212, in call
raise attempt.get()
File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\site-packages\pip\_vendor\retrying.py", line 247, in get
six.reraise(self.value[0], self.value[1], self.value[2])
File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\site-packages\pip\_vendor\six.py", line 693, in reraise
raise value
File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\site-packages\pip\_vendor\retrying.py", line 200, in call
attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\site-packages\pip\_internal\utils\misc.py", line 108, in rmtree
onerror=rmtree_errorhandler)
File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\shutil.py", line 494, in rmtree
return _rmtree_unsafe(path, onerror)
File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\shutil.py", line 384, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\shutil.py", line 384, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\shutil.py", line 384, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\shutil.py", line 384, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\shutil.py", line 384, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\shutil.py", line 393, in _rmtree_unsafe
onerror(os.rmdir, path, sys.exc_info())
File "c:\users\guar8001\appdata\local\continuum\anaconda3\envs\tensorflow\lib\site-packages\pip\_internal\utils\misc.py", line 120, in rmtree_errorhandler
func(path)
OSError: [WinError 145] The directory is not empty: 'C:\\Users\\guar8001\\AppData\\Local\\Temp\\pip-install-fkfkeii_\\tensorflow\\tensorflow-1.7.0.data\\purelib\\tensorflow\\python'
How can I install tensorflow.
I can think of a couple of scenarios:
1.Having the build directory open in a window
2.Anti-virus
Of these, two second is temporary and waiting will likely resolve the issue. The first(open in a window) I suspect is an instance of the more general "something is using the directory as the cwd" which won't go away until that process completes (and it can happen that a persistent background process ends up with the directory as cwd, meaning it won't go away till a reboot).
When trying to install jupyter on my Ubuntu 16.04 pc, I get this error:
Exception:
Traceback (most recent call last):
File "/home/moeketsi/.local/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/moeketsi/.local/lib/python3.5/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/home/moeketsi/.local/lib/python3.5/site-packages/pip/req/req_set.py", line 784, in install
**kwargs
File "/home/moeketsi/.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/moeketsi/.local/lib/python3.5/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/home/moeketsi/.local/lib/python3.5/site-packages/pip/wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "/home/moeketsi/.local/lib/python3.5/site-packages/pip/wheel.py", line 316, in clobber
ensure_dir(destdir)
File "/home/moeketsi/.local/lib/python3.5/site-packages/pip/utils/__init__.py", line 83, in ensure_dir
os.makedirs(path)
File "/usr/lib/python3.5/os.py", line 241, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.5/dist-packages/ipython_genutils-0.2.0.dist-info'
It just looks like you do not have administrator permissions in which case just add the sudo prefix.
Also be careful, you might have the wrong installation command. This looks like it is installing in the integrated Python 3.5 environment in which case if you are not careful you may break your system.
Sorry but a bit of a beginner question here. I downloaded Anaconda library that comes with Jupyter Notebook along with a few other programs to hopefully learn Python. Every time I try to open Jupyter Notebook though, the webpage it directs me here localhost:8888/tree and gives me the following error:
404: Not Found error webpage.
Edit: After using the terminal to install pip, I got the following error message:
Exception:
Traceback (most recent call last):
File "C:\Users\Y510P\Documents\Anaconda\lib\shutil.py", line 387, in _rmtree_u
nsafe
os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\Y510P\\AppData\\Loca
l\\Temp\\pip-0tanc911-uninstall\\users\\y510p\\documents\\anaconda\\lib\\site-pa
ckages\\zmq\\backend\\cython\\constants.cp36-win_amd64.pyd'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Y510P\Documents\Anaconda\lib\site-packages\pip\basecommand.py",
line 215, in main
status = self.run(options, args)
File "C:\Users\Y510P\Documents\Anaconda\lib\site-packages\pip\commands\install
.py", line 342, in run
prefix=options.prefix_path,
File "C:\Users\Y510P\Documents\Anaconda\lib\site-packages\pip\req\req_set.py",
line 795, in install
requirement.commit_uninstall()
File "C:\Users\Y510P\Documents\Anaconda\lib\site-packages\pip\req\req_install.
py", line 767, in commit_uninstall
self.uninstalled.commit()
File "C:\Users\Y510P\Documents\Anaconda\lib\site-packages\pip\req\req_uninstal
l.py", line 142, in commit
rmtree(self.save_dir)
File "C:\Users\Y510P\Documents\Anaconda\lib\site-packages\pip\_vendor\retrying
.py", line 49, in wrapped_f
return Retrying(*dargs, **dkw).call(f, *args, **kw)
File "C:\Users\Y510P\Documents\Anaconda\lib\site-packages\pip\_vendor\retrying
.py", line 212, in call
raise attempt.get()
File "C:\Users\Y510P\Documents\Anaconda\lib\site-packages\pip\_vendor\retrying
.py", line 247, in get
six.reraise(self.value[0], self.value[1], self.value[2])
File "C:\Users\Y510P\Documents\Anaconda\lib\site-packages\six.py", line 693, i
n reraise
raise value
File "C:\Users\Y510P\Documents\Anaconda\lib\site-packages\pip\_vendor\retrying
.py", line 200, in call
attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
File "C:\Users\Y510P\Documents\Anaconda\lib\site-packages\pip\utils\__init__.p
y", line 102, in rmtree
onerror=rmtree_errorhandler)
File "C:\Users\Y510P\Documents\Anaconda\lib\shutil.py", line 494, in rmtree
return _rmtree_unsafe(path, onerror)
File "C:\Users\Y510P\Documents\Anaconda\lib\shutil.py", line 384, in _rmtree_u
nsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Users\Y510P\Documents\Anaconda\lib\shutil.py", line 384, in _rmtree_u
nsafe
_rmtree_unsafe(fullname, onerror)
File "C:\Users\Y510P\Documents\Anaconda\lib\shutil.py", line 384, in _rmtree_u
nsafe
_rmtree_unsafe(fullname, onerror)
[Previous line repeated 5 more times]
File "C:\Users\Y510P\Documents\Anaconda\lib\shutil.py", line 389, in _rmtree_u
nsafe
onerror(os.unlink, fullname, sys.exc_info())
File "C:\Users\Y510P\Documents\Anaconda\lib\site-packages\pip\utils\__init__.p
y", line 114, in rmtree_errorhandler
func(path)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\Y510P\\AppData\\Loca
l\\Temp\\pip-0tanc911-uninstall\\users\\y510p\\documents\\anaconda\\lib\\site-pa
ckages\\zmq\\backend\\cython\\constants.cp36-win_amd64.pyd'
Your error message gives:
Copy/paste this URL into your browser when you connect for the first time, to login with a token:
http://localhost:8891/?token=dcf34cac4a27f8b92397fcec424b228b308a4588f0473fd6
So try that first in your browser and see if the error persist.
what is the web page you're going to . If you're using windows . Go to cmd prompt . type jupyter notebook . If you're in mac os x . go to terminal and type jupyter notebook. LMK if it doesnt work .Also this is the link once you trigger jupyter notebook. :
http://localhost:8888/tree
LMK Know
I am trying to install Django and have run into an error. This has been a consistent error for me, something I have not been able to figure out how to solve. I am on a mac.
Installing collected packages: Django
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/basecommand.py", line 211, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/commands/install.py", line 311, in run
root=options.root_path,
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_set.py", line 646, in install
**kwargs
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_install.py", line 803, in install
self.move_wheel_files(self.source_dir, root=root)
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_install.py", line 998, in move_wheel_files
isolated=self.isolated,
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/wheel.py", line 339, in move_wheel_files
clobber(source, lib_dir, True)
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/wheel.py", line 310, in clobber
ensure_dir(destdir)
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/utils/__init__.py", line 71, in ensure_dir
os.makedirs(path)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/django'
as karthikr said, you need
virtualenv project_env
cd project_env
. bin/activate
sudo pip install Django
I'm using linux mint and logged in as administrator. I have used pip to install packages before, but now whatever I try to install, i get this Error
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip-1.5.6-py2.7.egg/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip-1.5.6-py2.7.egg/pip/commands/install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/usr/local/lib/python2.7/dist-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 1435, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 671, in install
self.move_wheel_files(self.source_dir, root=root)
File "/usr/local/lib/python2.7/dist-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 901, in move_wheel_files
pycompile=self.pycompile,
File "/usr/local/lib/python2.7/dist-packages/pip-1.5.6-py2.7.egg/pip/wheel.py", line 215, in move_wheel_files
clobber(source, lib_dir, True)
File "/usr/local/lib/python2.7/dist-packages/pip-1.5.6-py2.7.egg/pip/wheel.py", line 205, in clobber
os.makedirs(destdir)
File "/usr/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/IPython'
Storing debug log for failure in /home/t90/.pip/pip.log
What could be the problem?