Windows permission error, 64 bit, psycopg2, python 3.4.2

Malik Rumi malik.a.rumi at gmail.com
Thu Feb 26 16:42:33 EST 2015


On Thursday, February 26, 2015 at 2:55:07 PM UTC-6, Mark Lawrence wrote:
> On 26/02/2015 15:10, Malik Rumi wrote:
> > I am one of those struggling with compile issues with python on 64 bit windows. I have not been able to get the solutions mentioned on Stack Overflow to work because installing Windows SDK 7.1 fails for me.
> >
> > So I stumbled across a precompiled psycopg2, and that reported that it worked, but then I got two permission errors. Then I read that this was a bug in python (issue 14252) that had been fixed, but I don't think this is the same error. That one specifically refers to subprocess.py and I don't have that in my traceback.  I have v3.4.2. On top of everything else, despite requesting a new password, all I get from the big tracker is 'invalid login'.
> >
> > In any event, running "import psycopg2" returns 'import error, no module named psycopg2'.
> >
> >
> > Microsoft Windows [Version 6.3.9600]
> > (c) 2013 Microsoft Corporation. All rights reserved.
> >
> > C:\Users\Semantic>pip install git+https://github.com/nwcell/psycopg2-windows.git
> > @win64-py34#egg=psycopg2
> > Downloading/unpacking psycopg2 from git+https://github.com/nwcell/psycopg2-windo
> > ws.git at win64-py34
> >    Cloning https://github.com/nwcell/psycopg2-windows.git (to win64-py34) to c:\u
> > sers\semantic\appdata\local\temp\pip_build_semantic\psycopg2
> >    Running setup.py (path:C:\Users\Semantic\AppData\Local\Temp\pip_build_Semantic
> > \psycopg2\setup.py) egg_info for package psycopg2
> >      C:\Python34\lib\distutils\dist.py:260: UserWarning: Unknown distribution opt
> > ion: 'summary'
> >        warnings.warn(msg)
> >
> > Installing collected packages: psycopg2
> >    Running setup.py install for psycopg2
> >      C:\Python34\lib\distutils\dist.py:260: UserWarning: Unknown distribution opt
> > ion: 'summary'
> >        warnings.warn(msg)
> >
> > Successfully installed psycopg2
> > 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\\Semantic\\AppData\\L
> > ocal\\Temp\\pip_build_Semantic\\psycopg2\\.git\\objects\\pack\\pack-be4d3da4a06b
> > 4c9ec4c06040dbf6685eeccca068.idx'
> >
> > 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
> >
> 
> The above clearly shows "Successfully installed psycopg2" and that it's 
> a permission error on cleanup that's gone wrong, so what is there to 
> report on the bug tracker?
> 
> -- 
> My fellow Pythonistas, ask not what our language can do for you, ask
> what you can do for our language.
> 
> Mark Lawrence

1. I did not mean to confuse you by reference to the bug tracker. My log in difficulties are not related to this issue.

2. The other reference to the bug tracker was to indicate that I don't think this is the same error as mentioned there. 

3. Despite the report of success, I do not have psycopg2. Since that failure was followed by the permission errors, I assume they are related. This is why I posted, to get help with this problem. I look forward to any assistance you or anyone else can render on this issue. Thanks. 

4. Going back to bug #14252, it is structurally very similar. I forget the program at issue there, but at first it reported success and that was followed by win error 5, and in fact the program had not installed correctly. The difference is that #14252 involved subprocess.py and my traceback does not mention subprocess.py at all. 



More information about the Python-list mailing list