An error occurred while starting the kernel in Spyder
The error is:
Traceback (most recent call last):
File "G:\Anaconda\lib\site‑packages\spyder\plugins\ipythonconsole.py", line 1572, in create_kernel_manager_and_kernel_client
kernel_manager.start_kernel(stderr=stderr_handle)
File "G:\Anaconda\lib\site‑packages\jupyter_client\manager.py", line 240, in start_kernel
self.write_connection_file()
File "G:\Anaconda\lib\site‑packages\jupyter_client\connect.py", line 547, in write_connection_file
kernel_name=self.kernel_name
File "G:\Anaconda\lib\site‑packages\jupyter_client\connect.py", line 212, in write_connection_file
with secure_write(fname) as f:
File "G:\Anaconda\lib\contextlib.py", line 112, in __enter__
return next(self.gen)
File "G:\Anaconda\lib\site‑packages\jupyter_client\connect.py", line 102, in secure_write
with os.fdopen(os.open(fname, open_flag, 0o600), mode) as f:
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\user\\AppData\\Roaming\\jupyter\\runtime\\kernel‑bd9c021b8392.json'
(Spyder maintainer here) To fix this problem please open the Anaconda Prompt and run there
conda update --all
Turn of fire wall and Run spyder as an administrator.
Related
I have installed anaconda package and my pc has already one package installed "root(data analysis package)".
So after installing anaconda I wanted to open jupyter notebook so I type "jupyter-notebook" in the terminal but somehow I am getting following error.
Could you please provide me a solution for this? Thanks.
the error
Traceback (most recent call last):
File "/home/souvik/anaconda3/bin/jupyter-notebook", line 11, in <module>
sys.exit(main())
File "/home/souvik/anaconda3/lib/python3.9/site-packages/jupyter_core/application.py", line 264, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/home/souvik/anaconda3/lib/python3.9/site-packages/traitlets/config/application.py", line 845, in launch_instance
app.initialize(argv)
File "/home/souvik/anaconda3/lib/python3.9/site-packages/traitlets/config/application.py", line 88, in inner
return method(app, *args, **kwargs)
File "/home/souvik/anaconda3/lib/python3.9/site-packages/notebook/notebookapp.py", line 2143, in initialize
super().initialize(argv)
File "/home/souvik/anaconda3/lib/python3.9/site-packages/traitlets/config/application.py", line 88, in inner
return method(app, *args, **kwargs)
File "/home/souvik/anaconda3/lib/python3.9/site-packages/jupyter_core/application.py", line 239, in initialize
self.migrate_config()
File "/home/souvik/anaconda3/lib/python3.9/site-packages/jupyter_core/application.py", line 165, in migrate_config
migrate()
File "/home/souvik/anaconda3/lib/python3.9/site-packages/jupyter_core/migrate.py", line 245, in migrate
with open(os.path.join(env['jupyter_config'], 'migrated'), 'w', encoding='utf-8') as f:
PermissionError: [Errno 13] Permission denied: '/opt/root/6.26.10-install/etc/notebook/migrated'*
I could not find any solution in google for this.
After a glimpse at the error Message,
You seem not to have access to /opt/root/6.26.10-install/etc/notebook/migrated
How did you install the anaconda? (globally or on root?)
since you are currently running as user "souvik"
Try running:
sudo jupyter-notebook --allow-root
Then post back the results.
In case the above command started jupypter-notebook successfully,
we can change the ownership of /opt/root/6.26.10-install/etc/notebook/from rootto you (souvik) using chown.
I've been trying to deploy an Django app in a Shared hosting with Cpanel.
But every time that I tried to install google-cloud-automl dependency I get this message on the server
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-vnlg73ta/grpcio/setup.py", line 212, in <module>
if check_linker_need_libatomic():
File "/tmp/pip-build-vnlg73ta/grpcio/setup.py", line 172, in check_linker_need_libatomic
stderr=PIPE)
File "/opt/alt/python37/lib64/python3.7/subprocess.py", line 800, in __init__
restore_signals, start_new_session)
File "/opt/alt/python37/lib64/python3.7/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: 'cc'
Any idea how I may install this dependency?
It was the pip version used on my virtualenv so after updated it worked
I recently tried to run my code in Spyder 3.7 and my Ipython console showed the following error, this is the case for all my codes:
An error ocurred while starting the kernel
The error is:
Traceback (most recent call last):
File "C:\Users\20191881\AppData\Local\Continuum\anaconda3\lib\site‑packages\spyder\plugins\ipythonconsole.py", line 1572, in create_kernel_manager_and_kernel_client
kernel_manager.start_kernel(stderr=stderr_handle)
File "C:\Users\20191881\AppData\Local\Continuum\anaconda3\lib\site‑packages\jupyter_client\manager.py", line 240, in start_kernel
self.write_connection_file()
File "C:\Users\20191881\AppData\Local\Continuum\anaconda3\lib\site‑packages\jupyter_client\connect.py", line 547, in write_connection_file
kernel_name=self.kernel_name
File "C:\Users\20191881\AppData\Local\Continuum\anaconda3\lib\site‑packages\jupyter_client\connect.py", line 212, in write_connection_file
with secure_write(fname) as f:
File "C:\Users\20191881\AppData\Local\Continuum\anaconda3\lib\contextlib.py", line 112, in __enter__
return next(self.gen)
File "C:\Users\20191881\AppData\Local\Continuum\anaconda3\lib\site‑packages\jupyter_client\connect.py", line 102, in secure_write
with os.fdopen(os.open(fname, open_flag, 0o600), mode) as f:
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\20191881\\AppData\\Roaming\\jupyter\\runtime\\kernel�caf3ec3.json'
I am very new to spyder and I have absolutely no idea how to solve this.
I have already tried to uninstall anaconda and install it again but the same error keeps appearing...
Does anyone have any idea how I could solve this?
I tried to use the Anaconda Navigator, but I'm getting this kernel error.
I had previously installed python 3.8 without Anaconda and had installed jupyter in it using pip, then I uninstalled it and installed Anaconda again.
Since then this error arises whenever I try to compile a file and even in the jupyter notebook.
I tried :
1.) Reinstalling Anaconda
2.) Updating the setup tools
None of these worked.
Traceback (most recent call last):
File "C:\Users\DELLL\Anaconda3\lib\site-packages\tornado\web.py", line 1699, in _execute
result = await result
File "C:\Users\DELLL\Anaconda3\lib\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:\Users\DELLL\Anaconda3\lib\site-packages\notebook\services\sessions\handlers.py", line 72, in post
type=mtype))
File "C:\Users\DELLL\Anaconda3\lib\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "C:\Users\DELLL\Anaconda3\lib\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:\Users\DELLL\Anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 88, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "C:\Users\DELLL\Anaconda3\lib\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "C:\Users\DELLL\Anaconda3\lib\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:\Users\DELLL\Anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 101, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "C:\Users\DELLL\Anaconda3\lib\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "C:\Users\DELLL\Anaconda3\lib\site-packages\tornado\gen.py", line 209, in wrapper
yielded = next(result)
File "C:\Users\DELLL\Anaconda3\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 168, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "C:\Users\DELLL\Anaconda3\lib\site-packages\jupyter_client\multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "C:\Users\DELLL\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 240, in start_kernel
self.write_connection_file()
File "C:\Users\DELLL\Anaconda3\lib\site-packages\jupyter_client\connect.py", line 547, in write_connection_file
kernel_name=self.kernel_name
File "C:\Users\DELLL\Anaconda3\lib\site-packages\jupyter_client\connect.py", line 212, in write_connection_file
with secure_write(fname) as f:
File "C:\Users\DELLL\Anaconda3\lib\contextlib.py", line 112, in __enter__
return next(self.gen)
File "C:\Users\DELLL\Anaconda3\lib\site-packages\jupyter_client\connect.py", line 102, in secure_write
with os.fdopen(os.open(fname, open_flag, 0o600), mode) as f:
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\DELLL\\AppData\\Roaming\\jupyter\\runtime\\kernel-4058ed7c-98d6-40c9-8b3b-2cbb069740d8.json'
Issue resolved.
The problem:
I had previously installed jupyter using pip install, when I was working on python 3.8.
Now, I uninstalled python 3.8 and installed Anaconda instead. This again reinstalled jupyter, thus was the cause of the problem.
To resolve this, I uninstalled jupyter from AnacondaPrompt using conda uninstall jupyter , and then reinstalled it, this time from conda install jupyter.
This resolved the kernel error.
This is permission issue for that particular folder
Set the environment path variables C:\Users\DELL\AppData\Roaming\jupyter\runtime
give the permission and it will work
I am attempting to install selenium, and yet there seems to be a problem:
I ran pip3 install -U selenium, and I get:
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/local/lib/python3.5/site-packages/pip/commands/install.py", line 317, in run
prefix=options.prefix_path,
File "/usr/local/lib/python3.5/site-packages/pip/req/req_set.py", line 742, in install
**kwargs
File "/usr/local/lib/python3.5/site-packages/pip/req/req_install.py", line 831, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/usr/local/lib/python3.5/site-packages/pip/req/req_install.py", line 1032, in move_wheel_files
isolated=self.isolated,
File "/usr/local/lib/python3.5/site-packages/pip/wheel.py", line 378, in move_wheel_files
clobber(source, dest, False, fixer=fixer, filter=filter)
File "/usr/local/lib/python3.5/site-packages/pip/wheel.py", line 317, in clobber
ensure_dir(destdir)
File "/usr/local/lib/python3.5/site-packages/pip/utils/__init__.py", line 83, in ensure_dir
os.makedirs(path)
File "/usr/local/Cellar/python3/3.5.2_2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/os.py", line 231, in makedirs
makedirs(head, mode, exist_ok)
File "/usr/local/Cellar/python3/3.5.2_2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/os.py", line 231, in makedirs
makedirs(head, mode, exist_ok)
File "/usr/local/Cellar/python3/3.5.2_2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/os.py", line 231, in makedirs
makedirs(head, mode, exist_ok)
File "/usr/local/Cellar/python3/3.5.2_2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/os.py", line 241, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/usr/local/selenium'
Despite this message, I can proceed and run selenium in python3, and a command like
from selenium import web driver
browser = webdriver.Firefox()
will return
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 64, in start
stdout=self.log_file, stderr=self.log_file)
File "/usr/local/Cellar/python3/3.5.2_2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "/usr/local/Cellar/python3/3.5.2_2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'geckodriver'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/site-packages/selenium/webdriver/firefox/webdriver.py", line 135, in __init__
self.service.start()
File "/usr/local/lib/python3.5/site-packages/selenium/webdriver/common/service.py", line 71, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
What do I need to do?
It can also be done without executing pip as superuser (which you should, at least, try not to):
Create the directory:
sudo mkdir /usr/local/selenium
Give yourself ownership of the directory:
chown your_username /usr/local/selenium
Install Selenium:
pip3 install -U selenium
Did you try to run pip install as a super user? It's common to have PermissionError when you miss the sudo. If you didn't, try sudo pip3 install -U selenium.