-
Notifications
You must be signed in to change notification settings - Fork 5.3k
ImportError: cannot import name 'secure_write' #5014
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
Comments
@GabriellaKwan Try this |
Awesome. work perfectly. |
Thanks saved my frustration |
Hi @SangamSwadiK , help me please Traceback (most recent call last): |
@oscaralarcon I also just received this error. The solution above did not work for me. However, running Git Bash as administrator did for me. Perhaps try this? |
@oscaralarcon Try the last one in this ,(he replaces the paths.py file ) |
@PhoenixEdward , @SangamSwadiK |
Thanks for help , it worked |
Right on - glad folks are succeeding with the helpful tips! I'm going to close this due to the success. Generally speaking, ensure that jupyter_client >= 5.3.4 and jupyter_core >= 4.6.1 for issues surrounding |
thanks it works with me |
Awesome! thanks that work fine for me too! |
Thanks for suggestion, it worked |
it is working |
thanks |
Many thanks !!! |
jupyter-client version = 6.1.11, jupyter-core ==4.7.0 and still doesn't work... |
Hi @HaneulKim214 - Perhaps there's a slightly different issue here or you're checking an environment in which the notebook server is not running within. Could you please post your notebook server's console output that contains the traceback of your issue? You might also want to try |
I am still getting ImportError: cannot import name 'secure_write' using jupyter_client version 5.3.4 and jupyter_core 4.7.1. I have already tried replacing paths.py in the env/site-packages/jupyter_core/paths.py. any ideas? |
This all implies you're dealing with one env but executing another. Are you sure you're looking at the active env when determining version information? Do you have a traceback exhibiting the ImportError? |
Yes. See below Traceback (most recent call last): Also, this is the current env conda list output (with package versions) # packages in environment at /home/dh47l/.conda/envs/cmapPy_py27: _libgcc_mutex 0.1 main |
I just noticed the jupyter_core package version is only 4.6.1. updated versions are not available in my miniconda channels, but the current versions are viable according to earlier comments. |
Strange. And do you find |
Yes, the function is defined as @contextmanager
|
This is beginning to exceed my Python experience level for how to go about troubleshooting. I'm assuming that you've tried.
|
Yes, I have. Thanks for all the help anyways I appreciate it |
Tapping some resources: @bollwyvl - do you have an idea on what might be going on in @dhamelse's scenario (comments within the last 4 days)? It seems the tools show one thing, but the runtime produces another such that |
Looks like a py27 env... pretty much you'd have to look at what worked last year about this time, and pin to those versions... but even then, some packages had started dropping. I basically wouldn't expect anything less than a year old to work there. |
@kevin-bates commented on 28 Jan That worked for me. Thanks |
also try |
It really helps for me. |
Thank you so much. Work perfectly for jupyter in vscode (with anaconda environment) |
Uh oh!
There was an error while loading. Please reload this page.
Last time(a day ago) I lauched the notebook and close it, it was running fine. Then I double clicked to open the jupyer-notebook.exe, a jupyter console window showed up and disappeared in 3 seconds and without openning the localhost:8888 page, nor could I manually open the localhost address. I used jupyter notebook command in the cmd window, it shows the following respond:
Traceback (most recent call last):
File "d:\python36\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "d:\python36\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "D:\Python36\Scripts\jupyter-notebook.EXE_main.py", line 4, in
File "d:\python36\lib\site-packages\notebook\notebookapp.py", line 81, in
from .services.kernels.kernelmanager import MappingKernelManager
File "d:\python36\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 19, in
from jupyter_client.session import Session
File "d:\python36\lib\site-packages\jupyter_client_init.py", line 4, in
from .connect import *
File "d:\python36\lib\site-packages\jupyter_client\connect.py", line 35, in
from jupyter_core.paths import jupyter_data_dir, jupyter_runtime_dir, secure_write
ImportError: cannot import name 'secure_write'
I tried reinstalling jupyter notebook using pip uninstall jupyter and pip install jupyter,but there is no use. The command jupyter notebook --help gives the same response as above.
I tried to search for similar issues online but failed finding any. If anyone knows the solution, please help. Thank you in advance!
The text was updated successfully, but these errors were encountered: