λ°μν
Anaconda3 64λΉνΈ νκ²½μμ Jupyter Labμ μ€ννλ €λ€ λ°μν μλ¬μ΄λ€. λ§μ κ³³μμλ μλμ κ°μ ν΄κ²°μ± μ λ§νκ³ μμΌλ νμμκ²λ λμμ΄ λμ§ μμλ€. (νΌμ΄ν¬ μ£Όμ!)
pip uninstall pypiwin32
pip install pywin32
μ€μ μ½λλ₯Ό μ°Ύμλ€μ΄κ° 보면 μ΄λ κ² μκ²Όλ€. μλμ½λ€ 64bit νκ²½μμ μ€νν λ μ΄ μ½λμ import win32api
μμ μλ¬κ° λ°μν κ²μ΄λ€.
{anaconda3κ²½λ‘}\envs\{νκ²½μ΄λ¦}\lib\site-packages\jupyter_core\paths.py
def win32_restrict_file_to_user(fname):
"""Secure a windows file to read-only access for the user.
Follows guidance from win32 library creator:
http://timgolden.me.uk/python/win32_how_do_i/add-security-to-a-file.html
This method should be executed against an already generated file which
has no secrets written to it yet.
Parameters
----------
fname : unicode
The path to the file to secure
"""
import win32api
import win32security
import ntsecuritycon as con
μλ¬μ κ°μ₯ μ€μν λ΄μ©μ μ΄ λΆλΆμ΄κ³ .
File "c:\anaconda3\envs\trader\lib\site-packages\jupyter_core\paths.py", line 387, in win32_restrict_file_to_user
import win32api
ImportError: DLL load failed while importing win32api: μ§μ λ λͺ¨λμ μ°Ύμ μ μμ΅λλ€.
μλ¬ λ΄μ©μ μ λ¬Έμ μλμ κ°λ€.
Traceback (most recent call last):
File "c:\anaconda3\envs\trader\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\anaconda3\envs\trader\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Anaconda3\envs\trader\Scripts\jupyter-lab.EXE\__main__.py", line 7, in <module>
File "c:\anaconda3\envs\trader\lib\site-packages\jupyter_server\extension\application.py", line 517, in launch_instance
serverapp.start()
File "c:\anaconda3\envs\trader\lib\site-packages\jupyter_server\serverapp.py", line 2012, in start
self.start_app()
File "c:\anaconda3\envs\trader\lib\site-packages\jupyter_server\serverapp.py", line 1972, in start_app
self.write_server_info_file()
File "c:\anaconda3\envs\trader\lib\site-packages\jupyter_server\serverapp.py", line 1862, in write_server_info_file
with secure_write(self.info_file) as f:
File "c:\anaconda3\envs\trader\lib\contextlib.py", line 113, in __enter__
return next(self.gen)
File "c:\anaconda3\envs\trader\lib\site-packages\jupyter_core\paths.py", line 461, in secure_write
win32_restrict_file_to_user(fname)
File "c:\anaconda3\envs\trader\lib\site-packages\jupyter_core\paths.py", line 387, in win32_restrict_file_to_user
import win32api
ImportError: DLL load failed while importing win32api: μ§μ λ λͺ¨λμ μ°Ύμ μ μμ΅λλ€.
"μ΄μ κ°μ₯ μ€μν ν΄κ²° λ°©λ² λκ°λ€."
λ¬Έμ ν΄κ²° λ°©λ²
conda λͺ λ Ήμ΄λ₯Ό ν΅ν΄ pywin32λ₯Ό μ€μΉν΄μ£Όμ.
conda install -c anaconda pywin32
μ΄νλ‘ jupyter lab
λͺ
λ Ήμ μ΄μ λ€μ μ λμνκ³ μλ€. λκ΅°κ° λΉμ·ν λ¬Έμ λ₯Ό κ²ͺλλ€λ©΄ λμμ΄ λμκΈ°λ₯Ό λ°λλ€.
λ°μν
λκΈ