Search code examples
pythonpython-2.7pipspyderpsychopy

Error messages while doing pip install psychopy on Windows


I am getting this kind of messages (image in attachment) while installing psychopy module in anaconda spyder 2.7 64 bit. I never got this kind of instructions before and I think because of that I am getting this sorts of error while running the code

from pyglet.window import key: ImportError: cannot import name key

cannot import name logging

NameError: name ‘PUINT’ is not defined

If some one can share information to avoid this problems, would be really helpful.

Traceback:

Exception:
Traceback (most recent call last):
File "C:\Users\Ravi\Anaconda2\lib\site-packages\pip\basecommand.py", line 
215, in main
status = self.run(options, args)
File "C:\Users\Ravi\Anaconda2\lib\site-packages\pip\commands\install.py", 
line 342, in run
prefix=options.prefix_path,
File "C:\Users\Ravi\Anaconda2\lib\site-packages\pip\req\req_set.py", line 
795, in install
requirement.commit_uninstall()

File "C:\Users\Ravi\Anaconda2\lib\site-packages\pip\req\req_install.py", 
line 767, in commit_uninstall
self.uninstalled.commit()
File "C:\Users\Ravi\Anaconda2\lib\site-packages\pip\req\req_uninstall.py", 
line 142, in commit
rmtree(self.save_dir)
File "C:\Users\Ravi\Anaconda2\lib\site-packages\pip\_vendor\retrying.py", 
line 49, in wrapped_f
return Retrying(*dargs, **dkw).call(f, *args, **kw)
File "C:\Users\Ravi\Anaconda2\lib\site-packages\pip\_vendor\retrying.py", 
line 212, in call
raise attempt.get()
File "C:\Users\Ravi\Anaconda2\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\Ravi\Anaconda2\lib\site-packages\pip\_vendor\retrying.py", 
line 200, in call
attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
File "C:\Users\Ravi\Anaconda2\lib\site-packages\pip\utils\__init__.py", line 
102, in rmtree
onerror=rmtree_errorhandler)
File "C:\Users\Ravi\Anaconda2\lib\shutil.py", line 261, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "C:\Users\Ravi\Anaconda2\lib\shutil.py", line 261, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "C:\Users\Ravi\Anaconda2\lib\shutil.py", line 261, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "C:\Users\Ravi\Anaconda2\lib\shutil.py", line 261, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "C:\Users\Ravi\Anaconda2\lib\shutil.py", line 261, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "C:\Users\Ravi\Anaconda2\lib\shutil.py", line 261, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "C:\Users\Ravi\Anaconda2\lib\shutil.py", line 261, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "C:\Users\Ravi\Anaconda2\lib\shutil.py", line 266, in rmtree
onerror(os.remove, fullname, sys.exc_info())
File "C:\Users\Ravi\Anaconda2\lib\site-packages\pip\utils\__init__.py", line 
114, in rmtree_errorhandler
func(path)
WindowsError: [Error 5] Zugriff verweigert: 
'c:\\users\\ravi\\appdata\\local\\temp\\pip-ta7sa2- 
uninstall\\users\\ravi\\anaconda2\\lib\\site- 
packages\\numpy\\core\\multiarray.pyd'

Error:

enter image description here


Solution

  • Your problem

    Looks like your user doesn't have the permission to install packages in your system (for all users).

    Solution

    From the Command Prompt, you can install the package for your user only, like this:

    pip install <package> --user
    

    OR

    You can install the package as Administrator, by following these steps:

    1. Run the Command Prompt as Administrator, using the Run This Program As An Administrator option.
    2. Run the command pip install <package>