のねのBlog

パソコンの問題や、ソフトウェアの開発で起きた問題など書いていきます。よろしくお願いします^^。

python defcon

(venv) C:\Users\m_fuj\Documents\PyCharm\myhello>cu2qu -h
Traceback (most recent call last):
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\m_fuj\Documents\PyCharm\myhello\venv\Scripts\cu2qu.exe\__main__.py", line 5, in <module>
  File "c:\users\m_fuj\documents\pycharm\myhello\venv\lib\site-packages\cu2qu\cli.py", line 13, in <module>
    import defcon
ModuleNotFoundError: No module named 'defcon'
(venv) C:\Users\m_fuj\Documents\PyCharm\myhello>pip install defcon
Collecting defcon
  Downloading https://files.pythonhosted.org/packages/59/f1/b55f04cb96239ec77ea712f867af30fdbe546280bad3743a3c3ebe4295e6/defcon-0.6.0-py2.py3-none-any.whl (191kB)
    100% |████████████████████████████████| 194kB 2.9MB/s
Requirement already satisfied: fonttools[ufo,unicode]>=3.31.0 in c:\users\m_fuj\documents\pycharm\myhello\venv\lib\site-packages (from defcon) (4.2.1)
Requirement already satisfied: fs<3,>=2.2.0; extra == "ufo" in c:\users\m_fuj\documents\pycharm\myhello\venv\lib\site-packages (from fonttools[ufo,unicode]>=3.31.0->defcon) (2.4.11)
Collecting unicodedata2>=12.1.0; (python_version < "3.8" and platform_python_implementation != "PyPy") and extra == "unicode" (from fonttools[ufo,unicode]>=3.31.0->defcon)
  Downloading https://files.pythonhosted.org/packages/ec/e0/de139d833eb2f1160bb3466fa8a55ab9f713c90d30ff8c60d59735be9d34/unicodedata2-12.1.0-cp37-cp37m-win_amd64.whl (406kB)
    100% |████████████████████████████████| 409kB 4.4MB/s
Requirement already satisfied: appdirs~=1.4.3 in c:\users\m_fuj\documents\pycharm\myhello\venv\lib\site-packages (from fs<3,>=2.2.0; extra == "ufo"->fonttools[ufo,unicode]>=3.31.0->defcon) (1.4.3)
Requirement already satisfied: setuptools in c:\users\m_fuj\documents\pycharm\myhello\venv\lib\site-packages\setuptools-40.8.0-py3.7.egg (from fs<3,>=2.2.0; extra == "ufo"->fonttools[ufo,unicode]>=3.31.0->defcon) (40.
8.0)
Requirement already satisfied: six~=1.10 in c:\users\m_fuj\documents\pycharm\myhello\venv\lib\site-packages (from fs<3,>=2.2.0; extra == "ufo"->fonttools[ufo,unicode]>=3.31.0->defcon) (1.13.0)
Requirement already satisfied: pytz in c:\users\m_fuj\documents\pycharm\myhello\venv\lib\site-packages (from fs<3,>=2.2.0; extra == "ufo"->fonttools[ufo,unicode]>=3.31.0->defcon) (2019.3)
Installing collected packages: defcon, unicodedata2
Successfully installed defcon-0.6.0 unicodedata2-12.1.0
(venv) C:\Users\m_fuj\Documents\PyCharm\myhello>cu2qu -h
usage: cu2qu [-h] [--version] [-v] [-e ERROR] [--keep-direction] [-i | -j [N]]
             [-o OUTPUT | -d DIRECTORY]
             INPUT [INPUT ...]

positional arguments:
  INPUT                 one or more input UFO source file(s).

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  -v, --verbose
  -e ERROR, --conversion-error ERROR
                        maxiumum approximation error measured in EM (default:
                        0.001)
  --keep-direction      do not reverse the contour direction
  -i, --interpolatable  whether curve conversion should keep interpolation
                        compatibility
  -j [N], --jobs [N]    Convert using N multiple processes (default: 1)
  -o OUTPUT, --output-file OUTPUT
                        output filename for the converted UFO. By default
                        fonts are modified in place. This only works with a
                        single input.
  -d DIRECTORY, --output-dir DIRECTORY
                        output directory where to save converted UFOs

pycharm pip install

(venv) myhello>pip list
Package    Version
---------- -------
pip        19.0.3
setuptools 40.8.0

(venv) \myhello>pip install cu2qu
Collecting cu2qu
  Downloading https://files.pythonhosted.org/packages/74/1f/3d449c8e4f1230e4dab197286d81dea06bef406604af321e313af40c0b47/cu2qu-1.6.6-cp37-cp37m-win_amd64.whl (169kB)
    100% |████████████████████████████████| 174kB 3.3MB/s
Collecting fonttools[ufo]>=3.32.0 (from cu2qu)
  Using cached https://files.pythonhosted.org/packages/50/6a/9ff3451b86c64ac3b1667ab823251373284ffa4eff09d57deae609c02955/fonttools-4.2.1-py3-none-any.whl
Collecting fs<3,>=2.2.0; extra == "ufo" (from fonttools[ufo]>=3.32.0->cu2qu)
  Using cached https://files.pythonhosted.org/packages/44/b6/9a5d4edd6e933bebfd15c64525ea8c787fc62fcbb0d167040771600f77eb/fs-2.4.11-py2.py3-none-any.whl
Collecting appdirs~=1.4.3 (from fs<3,>=2.2.0; extra == "ufo"->fonttools[ufo]>=3.32.0->cu2qu)
  Using cached https://files.pythonhosted.org/packages/56/eb/810e700ed1349edde4cbdc1b2a21e28cdf115f9faf263f6bbf8447c1abf3/appdirs-1.4.3-py2.py3-none-any.whl
Collecting pytz (from fs<3,>=2.2.0; extra == "ufo"->fonttools[ufo]>=3.32.0->cu2qu)
  Downloading https://files.pythonhosted.org/packages/e7/f9/f0b53f88060247251bf481fa6ea62cd0d25bf1b11a87888e53ce5b7c8ad2/pytz-2019.3-py2.py3-none-any.whl (509kB)
    100% |████████████████████████████████| 512kB 3.3MB/s
Requirement already satisfied: setuptools in c:\users\m_fuj\documents\pycharm\myhello\venv\lib\site-packages\setuptools-40.8.0-py3.7.egg (from fs<3,>=2.2.0; extra == "ufo"->fonttools[ufo]>=3.32.0->cu2qu) (40.8.0)
Collecting six~=1.10 (from fs<3,>=2.2.0; extra == "ufo"->fonttools[ufo]>=3.32.0->cu2qu)
  Downloading https://files.pythonhosted.org/packages/65/26/32b8464df2a97e6dd1b656ed26b2c194606c16fe163c695a992b36c11cdf/six-1.13.0-py2.py3-none-any.whl
Installing collected packages: appdirs, pytz, six, fs, fonttools, cu2qu
Successfully installed appdirs-1.4.3 cu2qu-1.6.6 fonttools-4.2.1 fs-2.4.11 pytz-2019.3 six-1.13.0

(venv) \myhello>pip list
Package    Version
---------- -------
appdirs    1.4.3
cu2qu      1.6.6
fonttools  4.2.1
fs         2.4.11
pip        19.0.3
pytz       2019.3
setuptools 40.8.0
six        1.13.0