-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PermissionError when Spyder is started #6319
Comments
Thanks for reporting. This happens because you have Spyder installed in your To fix this, you need to uninstall Anaconda and install it again for your user and in your |
@CAM-Gerlach, this shows quite clearly that this recurrent problem is due to a permissions error. |
I'll fix the first part:
|
@ccordoba12 Okay, thanks! I'll make sure to inform users thus when it inevitably gets reported again, and refer them to this issue as you have. Just to be clear, is that the reason you tagged me on this, or is there something else you'd like me to do? Thanks. |
@mzeeqazi, could you help us to debug this? The problem is we are unable to reproduce it. |
@CAM-Gerlach, I was wrong. @dalthviz work didn't fix this. I still don't understand why it happens. |
@ccordoba12 How can i help you?? |
Thanks for reporting the full error @mzeeqazi! That was what made me finally realize the source of this problem: the removal of the conda environment used to start our kernels. So the second part of your problem is a duplicate of issue #4958. You have two options to fix it until we do:
|
I forgot that we still have to fix the first part of your problem. |
@dalthviz, please work on this one. The idea is to address this problem
To solve it, we need to catch IOError and OSError around these lines and |
Error encountered when i open spyder
File "D:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\external\lockfile.py", line 88, in symlink
rename(newlinkname, filename)
PermissionError: [WinError 5] Access is denied: 'C:\Users\mzeeqazi\.spyder-py3\spyder.lock.1517167725983.newlink' -> 'C:\Users\mzeeqazi\.spyder-py3\spyder.lock'
Traceback (most recent call last):
File "D:\ProgramData\Anaconda3\lib\site-packages\spyder\app\start.py", line 118, in main
lock_created = lock.lock()
File "D:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\external\lockfile.py", line 150, in lock
symlink(str(os.getpid()), self.name)
File "D:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\external\lockfile.py", line 91, in symlink
os.rmdir(newlinkname)
OSError: [WinError 145] The directory is not empty: 'C:\Users\mzeeqazi\.spyder-py3\spyder.lock.1517167725983.newlink'
Traceback (most recent call last):
File "D:\ProgramData\Anaconda3\lib\site-packages\spyder\plugins_init_.py", line 511, in
toggled=lambda checked: self.toggle_view(checked),
File "D:\ProgramData\Anaconda3\lib\site-packages\spyder\plugins\ipythonconsole.py", line 713, in toggle_view
self.create_new_client(give_focus=False)
File "D:\ProgramData\Anaconda3\lib\site-packages\spyder\plugins\ipythonconsole.py", line 1009, in create_new_client
self.connect_client_to_kernel(client)
File "D:\ProgramData\Anaconda3\lib\site-packages\spyder\plugins\ipythonconsole.py", line 1035, in connect_client_to_kernel
stderr_file)
File "D:\ProgramData\Anaconda3\lib\site-packages\spyder\plugins\ipythonconsole.py", line 1440, in create_kernel_manager_and_kernel_client
kernel_manager.start_kernel(stderr=stderr)
File "D:\ProgramData\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 257, in start_kernel
**kw)
File "D:\ProgramData\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 203, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "D:\ProgramData\Anaconda3\lib\site-packages\jupyter_client\launcher.py", line 128, in launch_kernel
proc = Popen(cmd, **kwargs)
File "D:\ProgramData\Anaconda3\lib\subprocess.py", line 709, in init
restore_signals, start_new_session)
File "D:\ProgramData\Anaconda3\lib\subprocess.py", line 997, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
Version and main components
Dependencies
The text was updated successfully, but these errors were encountered: