This repository was archived by the owner on Mar 9, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 51
This repository was archived by the owner on Mar 9, 2023. It is now read-only.
SudachiPy doesn't work with Windows with "OSError: symbolic link privilege not held" #107
Copy link
Copy link
Closed
Description
SudachiPy doesn't work with Windows since Windows requires administrator privilege for creating symlink. It'd be nice if we could avoid using symlink for dictionary setting.
λ python
Python 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 03:37:03) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from sudachipy import tokenizer
>>> from sudachipy import dictionary
>>> tokenizer_obj = dictionary.Dictionary().create()
Traceback (most recent call last):
File "C:\Users\chezo\source\sudachi-test\.venv\lib\site-packages\sudachipy\config.py", line 55, in create_default_link_for_sudachidict_core
dict_path = Path(import_module('sudachidict').__file__).parent
File "C:\Python36\Lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'sudachidict'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\chezo\source\sudachi-test\.venv\lib\site-packages\sudachipy\dictionary.py", line 37, in __init__
self._read_system_dictionary(config.settings.system_dict_path())
File "C:\Users\chezo\source\sudachi-test\.venv\lib\site-packages\sudachipy\config.py", line 106, in system_dict_path
dict_path = create_default_link_for_sudachidict_core(output=f)
File "C:\Users\chezo\source\sudachi-test\.venv\lib\site-packages\sudachipy\config.py", line 71, in create_default_link_for_sudachidict_core
dict_path = set_default_dict_package('sudachidict_core', output=output)
File "C:\Users\chezo\source\sudachi-test\.venv\lib\site-packages\sudachipy\config.py", line 47, in set_default_dict_package
dst_path.symlink_to(src_path)
File "C:\Python36\Lib\pathlib.py", line 1325, in symlink_to
self._accessor.symlink(target, self, target_is_directory)
File "C:\Python36\Lib\pathlib.py", line 393, in wrapped
return strfunc(str(pathobjA), str(pathobjB), *args)
OSError: symbolic link privilege not held
sorami, buruzaemon and svlandeg
Metadata
Metadata
Assignees
Labels
No labels