GiNZA
code: zsh
$ python3 -m pip install --no-cache-dir -U ginza
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (setuptools 49.2.1 (/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages), Requirement.parse('setuptools>=58.0'))
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
$ pip install setuptools --upgrade
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: setuptools in /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages (49.2.1)
Collecting setuptools
Using cached setuptools-62.1.0-py3-none-any.whl (1.1 MB)
Installing collected packages: setuptools
Successfully installed setuptools-62.1.0
$ pip install -U ginza
同
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages
$ python3 -m pip install --upgrade pip setuptools wheel
Defaulting to user installation because normal site-packages is not writeable
Requirement already up-to-date: pip in /Users/wafuwafu13/Library/Python/3.8/lib/python/site-packages (22.0.4)
Requirement already up-to-date: setuptools in /Users/wafuwafu13/Library/Python/3.8/lib/python/site-packages (62.1.0)
Collecting wheel
Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel
WARNING: The script wheel is installed in '/Users/wafuwafu13/Library/Python/3.8/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed wheel-0.37.1
$ export PATH=$PATH:/Users/wafuwafu13/Library/Python/3.8/bin
~/desktop/setuptools-62.1.0
$ python3 setup.py install
running install
/Users/wafuwafu13/Desktop/setuptools-62.1.0/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/Users/wafuwafu13/Desktop/setuptools-62.1.0/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
Errno 13 Permission denied: '/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/test-easy-install-15913.write-test' The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
Please make the appropriate changes for your system and try again.
$ sudo python3 setup.py install
Installed /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools-62.1.0-py3.8.egg
Processing dependencies for setuptools==62.1.0
Finished processing dependencies for setuptools==62.1.0
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages
$ sudo rm -r setuptools
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages
$ sudo rm -r setuptools-49.2.1.dist-info
$ pip install -U ginza
$ ginza
銀座でランチをご一緒しましょう。
Traceback (most recent call last):
File "/Users/wafuwafu13/Library/Python/3.8/bin/ginza", line 5, in <module>
from ginza.command_line import main_ginza
File "/Users/wafuwafu13/Library/Python/3.8/lib/python/site-packages/ginza/__init__.py", line 6, in <module>
from spacy.lang.ja import DetailedToken
File "/Users/wafuwafu13/Library/Python/3.8/lib/python/site-packages/spacy/__init__.py", line 15, in <module>
from .cli.info import info # noqa: F401
File "/Users/wafuwafu13/Library/Python/3.8/lib/python/site-packages/spacy/cli/__init__.py", line 20, in <module>
from .init_config import init_config, fill_config # noqa: F401
File "/Users/wafuwafu13/Library/Python/3.8/lib/python/site-packages/spacy/cli/init_config.py", line 8, in <module>
from jinja2 import Template
File "/Users/wafuwafu13/Library/Python/3.8/lib/python/site-packages/jinja2/__init__.py", line 33, in <module>
from jinja2.environment import Environment, Template
File "/Users/wafuwafu13/Library/Python/3.8/lib/python/site-packages/jinja2/environment.py", line 13, in <module>
from jinja2 import nodes
File "/Users/wafuwafu13/Library/Python/3.8/lib/python/site-packages/jinja2/nodes.py", line 18, in <module>
from jinja2.utils import Markup
File "/Users/wafuwafu13/Library/Python/3.8/lib/python/site-packages/jinja2/utils.py", line 520, in <module>
from markupsafe import Markup, escape, soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/Users/wafuwafu13/Library/Python/3.8/lib/python/site-packages/markupsafe/__init__.py)
$ pip install -U ginza ja_ginza
同
~/desktop
$ pip install --upgrade jinja2
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: jinja2 in /Users/wafuwafu13/Library/Python/3.8/lib/python/site-packages (2.7.3)
Collecting jinja2
Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.1/133.1 KB 1.9 MB/s eta 0:00:00
Requirement already satisfied: MarkupSafe>=2.0 in /Users/wafuwafu13/Library/Python/3.8/lib/python/site-packages (from jinja2) (2.1.1)
Installing collected packages: jinja2
Attempting uninstall: jinja2
Found existing installation: Jinja2 2.7.3
Uninstalling Jinja2-2.7.3:
Successfully uninstalled Jinja2-2.7.3
Successfully installed jinja2-3.1.2
$ ginza
銀座でランチをご一緒しましょう。
# text = 銀座でランチをご一緒しましょう。
1 銀座 銀座 PROPN 名詞-固有名詞-地名-一般 _ 6 nmod _ SpaceAfter=No|BunsetuBILabel=B|BunsetuPositionType=SEM_HEAD|NP_B|Reading=ギンザ|NE=B-GPE|ENE=B-City
2 で で ADP 助詞-格助詞 _ 1 case _ SpaceAfter=No|BunsetuBILabel=I|BunsetuPositionType=SYN_HEAD|Reading=デ
3 ランチ ランチ NOUN 名詞-普通名詞-一般 _ 6 obj _ SpaceAfter=No|BunsetuBILabel=B|BunsetuPositionType=SEM_HEAD|NP_B|Reading=ランチ
4 を を ADP 助詞-格助詞 _ 3 case _ SpaceAfter=No|BunsetuBILabel=I|BunsetuPositionType=SYN_HEAD|Reading=ヲ
5 ご ご NOUN 接頭辞 _ 6 compound _ SpaceAfter=No|BunsetuBILabel=B|BunsetuPositionType=CONT|NP_B|Reading=ゴ
6 一緒 一緒 NOUN 名詞-普通名詞-サ変可能 _ 0 root _ SpaceAfter=No|BunsetuBILabel=I|BunsetuPositionType=ROOT|NP_I|Reading=イッショ
7 し する AUX 動詞-非自立可能 _ 6 aux _ SpaceAfter=No|BunsetuBILabel=I|BunsetuPositionType=SYN_HEAD|Inf=サ行変格,連用形-一般|Reading=シ
8 ましょう ます AUX 助動詞 _ 6 aux _ SpaceAfter=No|BunsetuBILabel=I|BunsetuPositionType=SYN_HEAD|Inf=助動詞-マス,意志推量形|Reading=マショウ
9 。 。 PUNCT 補助記号-句点 _ 6 punct _ SpaceAfter=No|BunsetuBILabel=I|BunsetuPositionType=CONT|Reading=。
~/Desktop/ginza
$ sudo python3 setup.py develop
Finished processing dependencies for ginza==5.1.1
$ pip install ja-ginza ja-ginza-electra
WARNING: The scripts convert-caffe2-to-onnx, convert-onnx-to-caffe2 and torchrun are installed in '/Users/wafuwafu13/Library/Python/3.8/bin' which is not on PATH.
$ vi ~/.zshrc
export PATH=$PATH:/Users/wafuwafu13/Library/Python/3.8/bin
~/desktop/ginza
$ pip install -e .
× python setup.py develop did not run successfully.
│ exit code: 1
running develop
Checking .pth file support in /Users/wafuwafu13/Library/Python/3.8/lib/python3.8/site-packages
/Applications/Xcode.app/Contents/Developer/usr/bin/python3 -E -c pass
/Users/wafuwafu13/Library/Python/3.8/lib/python/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
/Users/wafuwafu13/Library/Python/3.8/lib/python/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/Users/wafuwafu13/Library/Python/3.8/lib/python/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
TEST FAILED: /Users/wafuwafu13/Library/Python/3.8/lib/python3.8/site-packages does NOT support .pth files
bad install directory or PYTHONPATH
You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from. The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/Users/wafuwafu13/Library/Python/3.8/lib/python3.8/site-packages
and your PYTHONPATH environment variable currently contains:
''
Here are some of your options for correcting the problem:
* You can choose a different installation directory, i.e., one that is
on PYTHONPATH or supports .pth files
* You can add the installation directory to the PYTHONPATH environment
variable. (It must then also be on PYTHONPATH whenever you run
Python and want to use the package(s) you are installing.)
* You can set up the installation directory to support ".pth" files by
using one of the approaches described here:
Please make the appropriate changes for your system and try again.
running egg_info
$ vi ~/.zshrc
dd
~/desktop/ginza
$ export PYTHONPATH="${PYTHONPATH}:/Users/wafuwafu13/Library/Python/3.8/lib/python3.8/site-packages"
~/desktop/ginza
$ python3 -m pip install --user -e .
Installing collected packages: ginza
Running setup.py develop for ginza
error: subprocess-exited-with-error
× python setup.py develop did not run successfully.
│ exit code: 1
running develop
running egg_info
/Users/wafuwafu13/Library/Python/3.8/lib/python/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
/Users/wafuwafu13/Library/Python/3.8/lib/python/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/Users/wafuwafu13/Library/Python/3.8/lib/python/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
~/desktop/ginza
$ sudo python3 -m pip install --user -e .
Password:
WARNING: The directory '/Users/wafuwafu13/Library/Caches/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Obtaining file:///Users/wafuwafu13/Desktop/ginza
Successfully installed ginza
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv $ python3 setup.py test
...
Installed /Users/wafuwafu13/Desktop/ginza/.eggs/pytest_mock-3.7.0-py3.8.egg
running egg_info
~/desktop/ginza
$ sudo python3 setup.py test
/Users/wafuwafu13/Library/Python/3.8/lib/python/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
running pytest
/Users/wafuwafu13/Library/Python/3.8/lib/python/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/Users/wafuwafu13/Library/Python/3.8/lib/python/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
Searching for pytest-mock
Best match: pytest-mock 3.7.0
Processing pytest_mock-3.7.0-py3.8.egg
Using /Users/wafuwafu13/Desktop/ginza/.eggs/pytest_mock-3.7.0-py3.8.egg
running egg_info
writing ginza.egg-info/PKG-INFO
writing dependency_links to ginza.egg-info/dependency_links.txt
writing entry points to ginza.egg-info/entry_points.txt
writing requirements to ginza.egg-info/requires.txt
writing top-level names to ginza.egg-info/top_level.txt
reading manifest file 'ginza.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'ginza.egg-info/SOURCES.txt'
running build_ext
/Users/wafuwafu13/Library/Python/3.8/lib/python/site-packages/pep8.py:109: FutureWarning: Possible nested set at position 1
EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[({ | []}),;:]') ============================================================================ test session starts ============================================================================
platform darwin -- Python 3.8.9, pytest-7.1.1, pluggy-1.0.0
rootdir: /Users/wafuwafu13/Desktop/ginza
plugins: mock-3.7.0, xdist-2.5.0, forked-1.4.0, cov-3.0.0, pep8-1.0.6
collected 258 items
ginza/tests/test_analyzer.py .......... 3% ginza/tests/test_command_line.py FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF.