petermr / pyami

Semantic Reader of the Scientific Literature
Apache License 2.0
12 stars 9 forks source link

`py4ami` cannot load `lxml` #5

Open EmanuelFaria opened 2 years ago

EmanuelFaria commented 2 years ago

@Peter Murray-Rust Following is an error running py4ami:

(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % py4ami
Traceback (most recent call last):
 File "/Library/Frameworks/Python.framework/Versions/3.8/bin/py4ami", line 33, in <module>
  sys.exit(load_entry_point('py4ami==0.0.35', 'console_scripts', 'py4ami')())
 File "/Library/Frameworks/Python.framework/Versions/3.8/bin/py4ami", line 25, in importlib_load_entry_point
  return next(matches).load()
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/metadata.py", line 77, in load
  module = import_module(match.group('module'))
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
  return _bootstrap._gcd_import(name[level:], package, level)
 File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
 File "<frozen importlib._bootstrap>", line 991, in _find_and_load
 File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
 File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
 File "<frozen importlib._bootstrap_external>", line 848, in exec_module
 File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
 File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami/pyamix.py", line 7, in <module>
  import lxml.etree as etree
ModuleNotFoundError: No module named 'lxml'

I tried reinstalling py4ami using pip3 install --force-reinstall --no-cache-dir py4ami (see log below), and then re-ran, but got the same error as above:

(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % pip3 install --force-reinstall --no-cache-dir py4ami

Collecting py4ami
 Downloading py4ami-0.0.35.tar.gz (11.0 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.0/11.0 MB 28.0 MB/s eta 0:00:00
 Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for py4ami, since package 'wheel' is not installed.
Installing collected packages: py4ami
 Attempting uninstall: py4ami
  Found existing installation: py4ami 0.0.35
  Uninstalling py4ami-0.0.35:
   Successfully uninstalled py4ami-0.0.35
 Running setup.py install for py4ami ... done
Successfully installed py4ami-0.0.35
petermr commented 1 year ago

This seems to be a problem with the order of loading lxml.

Manny writes:

long story short, I finally got py4ami working, but not in the way we expected. In the end, it turns out that I had to install pyamiimage first. (And this is after I uninstalled and reinstalled py4ami, docanalysis, and xml.) I even used easyfind.app to see where all the hidden files were thoughtout the system. What I learned that using pip uninstall <> and python pip -m uninstall <> left LOTS of files and folders undeleted. So I did that manually, reinstalled everything again, and everyting worked — except py4ami. Until I noticed a "ModuleNotFoundError" for pyamiimage. I ran pip install pyamiimage and then ran py4ami and it worked. I'll attach the terminal window output to this message.

Last login: Sun Nov 13 18:57:48 on ttys003
emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % source venv/bin/activate
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % pip install py4ami
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Collecting py4ami
  Using cached py4ami-0.0.40.tar.gz (11.0 MB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: py4ami
  Building wheel for py4ami (setup.py) ... done
  Created wheel for py4ami: filename=py4ami-0.0.40-py3-none-any.whl size=11518376 sha256=b598b8a6d213230e4ed6a49d06ea740431f22798515f147ed73d72ba71484c2f
  Stored in directory: /Users/emanuelfarruda/Library/Caches/pip/wheels/dc/34/b2/e0dc3348aa3ef761e3d3950ed888ac9a0c69caa21bc85e52d1
Successfully built py4ami
Installing collected packages: py4ami
  DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Successfully installed py4ami-0.0.40

(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % py4ami
Traceback (most recent call last):
  File "/usr/local/bin/py4ami", line 5, in <module>
    from py4ami.pyamix import main
  File "/usr/local/lib/python3.8/site-packages/py4ami/pyamix.py", line 7, in <module>
    import lxml.etree as etree
ModuleNotFoundError: No module named 'lxml'
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % pip install lxml
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Collecting lxml
  Using cached lxml-4.9.1-cp38-cp38-macosx_10_15_x86_64.whl (4.6 MB)
Installing collected packages: lxml
  DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Successfully installed lxml-4.9.1
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % py4ami
Traceback (most recent call last):
  File "/usr/local/bin/py4ami", line 5, in <module>
    from py4ami.pyamix import main
  File "/usr/local/lib/python3.8/site-packages/py4ami/pyamix.py", line 18, in <module>
    from py4ami.ami_convert import ConvType, Converters
  File "/usr/local/lib/python3.8/site-packages/py4ami/ami_convert.py", line 11, in <module>
    from py4ami.ami_gui import Gutil
  File "/usr/local/lib/python3.8/site-packages/py4ami/ami_gui.py", line 21, in <module>
    from py4ami.search_lib import AmiSearch, AmiSection, AmiDictionaries, AmiProjects
  File "/usr/local/lib/python3.8/site-packages/py4ami/search_lib.py", line 25, in <module>
    from py4ami.ami_project import AmiProjects
  File "/usr/local/lib/python3.8/site-packages/py4ami/ami_project.py", line 15, in <module>
    from py4ami.ami_pdf import PDFArgs
  File "/usr/local/lib/python3.8/site-packages/py4ami/ami_pdf.py", line 35, in <module>
    from py4ami.bbox_copy import BBox  # this is horrid, but I don't have a library
  File "/usr/local/lib/python3.8/site-packages/py4ami/bbox_copy.py", line 4, in <module>
    from pyamiimage.ami_util import AmiUtil
ModuleNotFoundError: No module named 'pyamiimage'
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % python -m pip install py4ami
Collecting py4ami
  Using cached py4ami-0.0.40-py3-none-any.whl
Installing collected packages: py4ami
Successfully installed py4ami-0.0.40

[notice] A new release of pip available: 22.2.2 -> 22.3.1
[notice] To update, run: python -m pip install --upgrade pip
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % python -m pip install --upgrade pip
Requirement already satisfied: pip in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (22.2.2)
Collecting pip
  Downloading pip-22.3.1-py3-none-any.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 4.5 MB/s eta 0:00:00
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 22.2.2
    Uninstalling pip-22.2.2:
      Successfully uninstalled pip-22.2.2
Successfully installed pip-22.3.1
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % pip install --upgrade --force-reinstall py4ami                   
Collecting py4ami
  Using cached py4ami-0.0.40.tar.gz (11.0 MB)
  Preparing metadata (setup.py) ... done
Installing collected packages: py4ami
  Attempting uninstall: py4ami
    Found existing installation: py4ami 0.0.40
    Uninstalling py4ami-0.0.40:
      Successfully uninstalled py4ami-0.0.40
  DEPRECATION: py4ami is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for py4ami ... done
Successfully installed py4ami-0.0.40
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % py4am -h
zsh: command not found: py4am
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % py4ami -h
Traceback (most recent call last):
  File "/usr/local/bin/py4ami", line 5, in <module>
    from py4ami.pyamix import main
  File "/usr/local/lib/python3.8/site-packages/py4ami/pyamix.py", line 18, in <module>
    from py4ami.ami_convert import ConvType, Converters
  File "/usr/local/lib/python3.8/site-packages/py4ami/ami_convert.py", line 11, in <module>
    from py4ami.ami_gui import Gutil
  File "/usr/local/lib/python3.8/site-packages/py4ami/ami_gui.py", line 21, in <module>
    from py4ami.search_lib import AmiSearch, AmiSection, AmiDictionaries, AmiProjects
  File "/usr/local/lib/python3.8/site-packages/py4ami/search_lib.py", line 25, in <module>
    from py4ami.ami_project import AmiProjects
  File "/usr/local/lib/python3.8/site-packages/py4ami/ami_project.py", line 15, in <module>
    from py4ami.ami_pdf import PDFArgs
  File "/usr/local/lib/python3.8/site-packages/py4ami/ami_pdf.py", line 35, in <module>
    from py4ami.bbox_copy import BBox  # this is horrid, but I don't have a library
  File "/usr/local/lib/python3.8/site-packages/py4ami/bbox_copy.py", line 4, in <module>
    from pyamiimage.ami_util import AmiUtil
ModuleNotFoundError: No module named 'pyamiimage'
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ %                                                 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % pip install --upgrade --force-reinstall docanalysis
Collecting docanalysis
  Using cached docanalysis-0.2.0.tar.gz (37 kB)
  Preparing metadata (setup.py) ... done
Collecting abbreviations
  Using cached abbreviations-0.2.5-py3-none-any.whl (5.7 kB)
Collecting scispacy
  Using cached scispacy-0.5.1-py3-none-any.whl (44 kB)
Collecting beautifulsoup4==4.10.0
  Using cached beautifulsoup4-4.10.0-py3-none-any.whl (97 kB)
Collecting braceexpand==0.1.7
  Using cached braceexpand-0.1.7-py2.py3-none-any.whl (5.9 kB)
Collecting coloredlogs==15.0.1
  Using cached coloredlogs-15.0.1-py2.py3-none-any.whl (46 kB)
Collecting ConfigArgParse==1.5.3
  Using cached ConfigArgParse-1.5.3-py3-none-any.whl (20 kB)
Collecting lxml==4.7.1
  Using cached lxml-4.7.1-cp38-cp38-macosx_10_14_x86_64.whl (4.5 MB)
Collecting nltk==3.6.7
  Using cached nltk-3.6.7-py3-none-any.whl (1.5 MB)
Collecting pandas==1.3.4
  Using cached pandas-1.3.4-cp38-cp38-macosx_10_9_x86_64.whl (11.4 MB)
Collecting py4ami
  Using cached py4ami-0.0.40.tar.gz (11.0 MB)
  Preparing metadata (setup.py) ... done
Collecting pygetpapers
  Using cached pygetpapers-1.2.3-py3-none-any.whl (44 kB)
Collecting pytest==6.2.5
  Using cached pytest-6.2.5-py3-none-any.whl (280 kB)
Collecting scispacy
  Using cached scispacy-0.4.0-py3-none-any.whl (44 kB)
Collecting setuptools==60.3.1
  Using cached setuptools-60.3.1-py3-none-any.whl (953 kB)
Collecting spacy==3.0.7
  Using cached spacy-3.0.7-cp38-cp38-macosx_10_9_x86_64.whl (6.0 MB)
Collecting tkinterweb==3.10.7
  Using cached tkinterweb-3.10.7.tar.gz (1.1 MB)
  Preparing metadata (setup.py) ... done
Collecting tqdm==4.62.3
  Using cached tqdm-4.62.3-py2.py3-none-any.whl (76 kB)
Collecting soupsieve>1.2
  Using cached soupsieve-2.3.2.post1-py3-none-any.whl (37 kB)
Collecting humanfriendly>=9.1
  Using cached humanfriendly-10.0-py2.py3-none-any.whl (86 kB)
Collecting joblib
  Using cached joblib-1.2.0-py3-none-any.whl (297 kB)
Collecting regex>=2021.8.3
  Using cached regex-2022.10.31-cp38-cp38-macosx_10_9_x86_64.whl (294 kB)
Collecting click
  Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting python-dateutil>=2.7.3
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting pytz>=2017.3
  Using cached pytz-2022.6-py2.py3-none-any.whl (498 kB)
Collecting numpy>=1.17.3
  Using cached numpy-1.23.4-cp38-cp38-macosx_10_9_x86_64.whl (18.1 MB)
Collecting iniconfig
  Using cached iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB)
Collecting py>=1.8.2
  Using cached py-1.11.0-py2.py3-none-any.whl (98 kB)
Collecting packaging
  Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting toml
  Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting pluggy<2.0,>=0.12
  Using cached pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting attrs>=19.2.0
  Using cached attrs-22.1.0-py2.py3-none-any.whl (58 kB)
Collecting requests<3.0.0,>=2.0.0
  Using cached requests-2.28.1-py3-none-any.whl (62 kB)
Collecting conllu
  Using cached conllu-4.5.2-py2.py3-none-any.whl (16 kB)
Collecting pysbd
  Using cached pysbd-0.3.4-py3-none-any.whl (71 kB)
Collecting nmslib>=1.7.3.6
  Using cached nmslib-2.1.1-cp38-cp38-macosx_10_15_x86_64.whl (935 kB)
Collecting scikit-learn>=0.20.3
  Using cached scikit_learn-1.1.3-cp38-cp38-macosx_10_9_x86_64.whl (8.6 MB)
Collecting murmurhash<1.1.0,>=0.28.0
  Using cached murmurhash-1.0.9-cp38-cp38-macosx_10_9_x86_64.whl (18 kB)
Collecting jinja2
  Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting cymem<2.1.0,>=2.0.2
  Using cached cymem-2.0.7-cp38-cp38-macosx_10_9_x86_64.whl (32 kB)
Collecting typer<0.4.0,>=0.3.0
  Using cached typer-0.3.2-py3-none-any.whl (21 kB)
Collecting blis<0.8.0,>=0.4.0
  Using cached blis-0.7.9-cp38-cp38-macosx_10_9_x86_64.whl (6.1 MB)
Collecting spacy-legacy<3.1.0,>=3.0.5
  Using cached spacy_legacy-3.0.10-py2.py3-none-any.whl (21 kB)
Collecting pathy>=0.3.5
  Using cached pathy-0.6.2-py3-none-any.whl (42 kB)
Collecting preshed<3.1.0,>=3.0.2
  Using cached preshed-3.0.8-cp38-cp38-macosx_10_9_x86_64.whl (107 kB)
Collecting wasabi<1.1.0,>=0.8.1
  Using cached wasabi-0.10.1-py3-none-any.whl (26 kB)
Collecting srsly<3.0.0,>=2.4.1
  Using cached srsly-2.4.5-cp38-cp38-macosx_10_9_x86_64.whl (489 kB)
Collecting catalogue<2.1.0,>=2.0.4
  Using cached catalogue-2.0.8-py3-none-any.whl (17 kB)
Collecting thinc<8.1.0,>=8.0.3
  Using cached thinc-8.0.17-cp38-cp38-macosx_10_9_x86_64.whl (640 kB)
Collecting pydantic!=1.8,!=1.8.1,<1.9.0,>=1.7.4
  Using cached pydantic-1.8.2-cp38-cp38-macosx_10_9_x86_64.whl (2.6 MB)
Collecting pillow
  Using cached Pillow-9.3.0-cp38-cp38-macosx_10_10_x86_64.whl (3.3 MB)
Collecting xmltodict
  Using cached xmltodict-0.13.0-py2.py3-none-any.whl (10.0 kB)
Collecting dict2xml
  Using cached dict2xml-1.7.2.tar.gz (12 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting habanero
  Using cached habanero-1.2.2-py3-none-any.whl (29 kB)
Collecting arxiv
  Using cached arxiv-1.4.2-py3-none-any.whl (11 kB)
Collecting psutil
  Using cached psutil-5.9.4-cp36-abi3-macosx_10_9_x86_64.whl (243 kB)
Collecting pybind11<2.6.2
  Using cached pybind11-2.6.1-py2.py3-none-any.whl (188 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
  Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Collecting smart-open<6.0.0,>=5.2.1
  Using cached smart_open-5.2.1-py3-none-any.whl (58 kB)
Collecting typing-extensions>=3.7.4.3
  Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Collecting six>=1.5
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting charset-normalizer<3,>=2
  Using cached charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2022.9.24-py3-none-any.whl (161 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.12-py2.py3-none-any.whl (140 kB)
Collecting threadpoolctl>=2.0.0
  Using cached threadpoolctl-3.1.0-py3-none-any.whl (14 kB)
Collecting scipy>=1.3.2
  Using cached scipy-1.9.3-cp38-cp38-macosx_10_9_x86_64.whl (34.2 MB)
Collecting click
  Using cached click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting feedparser
  Using cached feedparser-6.0.10-py3-none-any.whl (81 kB)
Collecting MarkupSafe>=2.0
  Using cached MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_x86_64.whl (13 kB)
Collecting sgmllib3k
  Using cached sgmllib3k-1.0.0.tar.gz (5.8 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: dict2xml
  Building wheel for dict2xml (pyproject.toml) ... done
  Created wheel for dict2xml: filename=dict2xml-1.7.2-py3-none-any.whl size=6976 sha256=ce6265be217129f673778d892fb54d30af2a773a0ee7abcb8f367e69494fb099
  Stored in directory: /Users/emanuelfarruda/Library/Caches/pip/wheels/cc/85/17/4c3fc157d10f3b5facdf623391d312cfae0cf034ac3cd4e3f7
Successfully built dict2xml
Installing collected packages: wasabi, sgmllib3k, pytz, iniconfig, cymem, braceexpand, xmltodict, urllib3, typing-extensions, tqdm, toml, threadpoolctl, spacy-legacy, soupsieve, smart-open, six, setuptools, regex, pysbd, pyparsing, pybind11, py4ami, py, psutil, pluggy, pillow, numpy, murmurhash, MarkupSafe, lxml, joblib, idna, humanfriendly, feedparser, dict2xml, conllu, ConfigArgParse, click, charset-normalizer, certifi, catalogue, attrs, typer, tkinterweb, srsly, scipy, requests, python-dateutil, pydantic, preshed, packaging, nmslib, nltk, jinja2, coloredlogs, blis, beautifulsoup4, arxiv, abbreviations, thinc, scikit-learn, pytest, pathy, pandas, habanero, spacy, pygetpapers, scispacy, docanalysis
  DEPRECATION: sgmllib3k is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for sgmllib3k ... done
  Attempting uninstall: setuptools
    Found existing installation: setuptools 56.0.0
    Uninstalling setuptools-56.0.0:
      Successfully uninstalled setuptools-56.0.0
  Attempting uninstall: py4ami
    Found existing installation: py4ami 0.0.40
    Uninstalling py4ami-0.0.40:
      Successfully uninstalled py4ami-0.0.40
  DEPRECATION: py4ami is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for py4ami ... done
  Attempting uninstall: certifi
    Found existing installation: certifi 2022.9.24
    Uninstalling certifi-2022.9.24:
      Successfully uninstalled certifi-2022.9.24
  DEPRECATION: tkinterweb is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for tkinterweb ... done
  DEPRECATION: docanalysis is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for docanalysis ... done
Successfully installed ConfigArgParse-1.5.3 MarkupSafe-2.1.1 abbreviations-0.2.5 arxiv-1.4.2 attrs-22.1.0 beautifulsoup4-4.10.0 blis-0.7.9 braceexpand-0.1.7 catalogue-2.0.8 certifi-2022.9.24 charset-normalizer-2.1.1 click-7.1.2 coloredlogs-15.0.1 conllu-4.5.2 cymem-2.0.7 dict2xml-1.7.2 docanalysis-0.2.0 feedparser-6.0.10 habanero-1.2.2 humanfriendly-10.0 idna-3.4 iniconfig-1.1.1 jinja2-3.1.2 joblib-1.2.0 lxml-4.7.1 murmurhash-1.0.9 nltk-3.6.7 nmslib-2.1.1 numpy-1.23.4 packaging-21.3 pandas-1.3.4 pathy-0.6.2 pillow-9.3.0 pluggy-1.0.0 preshed-3.0.8 psutil-5.9.4 py-1.11.0 py4ami-0.0.40 pybind11-2.6.1 pydantic-1.8.2 pygetpapers-1.2.3 pyparsing-3.0.9 pysbd-0.3.4 pytest-6.2.5 python-dateutil-2.8.2 pytz-2022.6 regex-2022.10.31 requests-2.28.1 scikit-learn-1.1.3 scipy-1.9.3 scispacy-0.4.0 setuptools-60.3.1 sgmllib3k-1.0.0 six-1.16.0 smart-open-5.2.1 soupsieve-2.3.2.post1 spacy-3.0.7 spacy-legacy-3.0.10 srsly-2.4.5 thinc-8.0.17 threadpoolctl-3.1.0 tkinterweb-3.10.7 toml-0.10.2 tqdm-4.62.3 typer-0.3.2 typing-extensions-4.4.0 urllib3-1.26.12 wasabi-0.10.1 xmltodict-0.13.0
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % docanalysis
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_distutils_hack/__init__.py:36: UserWarning: Setuptools is replacing distutils.
  warnings.warn("Setuptools is replacing distutils.")
usage: docanalysis [-h] [--run_pygetpapers] [--make_section] [-q QUERY] [-k HITS] [--project_name PROJECT_NAME] [-d [DICTIONARY [DICTIONARY ...]]]
                   [-o OUTPUT] [--make_ami_dict MAKE_AMI_DICT] [--search_section [SEARCH_SECTION [SEARCH_SECTION ...]]]
                   [--entities [ENTITIES [ENTITIES ...]]] [--spacy_model SPACY_MODEL] [--html HTML] [--synonyms SYNONYMS] [--make_json MAKE_JSON]
                   [--search_html] [--extract_abb EXTRACT_ABB] [-l LOGLEVEL] [-f LOGFILE]

Welcome to docanalysis version 0.2.0. -h or --help for help

optional arguments:
  -h, --help            show this help message and exit
  --run_pygetpapers     [Command] downloads papers from EuropePMC via pygetpapers
  --make_section        [Command] makes sections; requires a fulltext.xml in CTree directories
  -q QUERY, --query QUERY
                        [pygetpapers] query string
  -k HITS, --hits HITS  [pygetpapers] number of papers to download
  --project_name PROJECT_NAME
                        CProject directory name
  -d [DICTIONARY [DICTIONARY ...]], --dictionary [DICTIONARY [DICTIONARY ...]]
                        [file name/url] existing ami dictionary to annotate sentences or support supervised entity extraction
  -o OUTPUT, --output OUTPUT
                        outputs csv with sentences/terms
  --make_ami_dict MAKE_AMI_DICT
                        [Command] title for ami-dict. Makes ami-dict of all extracted entities; works only with spacy
  --search_section [SEARCH_SECTION [SEARCH_SECTION ...]]
                        [NER/dictionary search] section(s) to annotate. Choose from: ALL, ACK, AFF, AUT, CON, DIS, ETH, FIG, INT, KEY, MET, RES, TAB,
                        TIL. Defaults to ALL
  --entities [ENTITIES [ENTITIES ...]]
                        [NER] entities to extract. Default (ALL). Common entities SpaCy: GPE, LANGUAGE, ORG, PERSON (for additional ones check: );
                        SciSpaCy: CHEMICAL, DISEASE
  --spacy_model SPACY_MODEL
                        [NER] optional. Choose between spacy or scispacy models. Defaults to spacy
  --html HTML           outputs html with sentences/terms
  --synonyms SYNONYMS   annotate the corpus/sections with synonyms from ami-dict
  --make_json MAKE_JSON
                        outputs json with sentences/terms
  --search_html         searches html documents (mainly IPCC)
  --extract_abb EXTRACT_ABB
                        [Command] title for abb-ami-dict. Extracts abbreviations and expansions; makes ami-dict of all extracted entities
  -l LOGLEVEL, --loglevel LOGLEVEL
                        provide logging level. Example --log warning <<info,warning,debug,error,critical>>, default='info'
  -f LOGFILE, --logfile LOGFILE
                        saves log to specified file in output directory as well as printing to terminal
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % py4ami
Traceback (most recent call last):
  File "/usr/local/bin/py4ami", line 5, in <module>
    from py4ami.pyamix import main
  File "/usr/local/lib/python3.8/site-packages/py4ami/pyamix.py", line 18, in <module>
    from py4ami.ami_convert import ConvType, Converters
  File "/usr/local/lib/python3.8/site-packages/py4ami/ami_convert.py", line 11, in <module>
    from py4ami.ami_gui import Gutil
  File "/usr/local/lib/python3.8/site-packages/py4ami/ami_gui.py", line 21, in <module>
    from py4ami.search_lib import AmiSearch, AmiSection, AmiDictionaries, AmiProjects
  File "/usr/local/lib/python3.8/site-packages/py4ami/search_lib.py", line 25, in <module>
    from py4ami.ami_project import AmiProjects
  File "/usr/local/lib/python3.8/site-packages/py4ami/ami_project.py", line 15, in <module>
    from py4ami.ami_pdf import PDFArgs
  File "/usr/local/lib/python3.8/site-packages/py4ami/ami_pdf.py", line 35, in <module>
    from py4ami.bbox_copy import BBox  # this is horrid, but I don't have a library
  File "/usr/local/lib/python3.8/site-packages/py4ami/bbox_copy.py", line 4, in <module>
    from pyamiimage.ami_util import AmiUtil
ModuleNotFoundError: No module named 'pyamiimage'
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % pip install --upgrade --force-reinstall lxml       
Collecting lxml
  Using cached lxml-4.9.1-cp38-cp38-macosx_10_15_x86_64.whl (4.6 MB)
Installing collected packages: lxml
  Attempting uninstall: lxml
    Found existing installation: lxml 4.7.1
    Uninstalling lxml-4.7.1:
      Successfully uninstalled lxml-4.7.1
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
docanalysis 0.2.0 requires lxml==4.7.1, but you have lxml 4.9.1 which is incompatible.
Successfully installed lxml-4.9.1
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % docanalysis
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_distutils_hack/__init__.py:36: UserWarning: Setuptools is replacing distutils.
  warnings.warn("Setuptools is replacing distutils.")
usage: docanalysis [-h] [--run_pygetpapers] [--make_section] [-q QUERY] [-k HITS] [--project_name PROJECT_NAME] [-d [DICTIONARY [DICTIONARY ...]]]
                   [-o OUTPUT] [--make_ami_dict MAKE_AMI_DICT] [--search_section [SEARCH_SECTION [SEARCH_SECTION ...]]]
                   [--entities [ENTITIES [ENTITIES ...]]] [--spacy_model SPACY_MODEL] [--html HTML] [--synonyms SYNONYMS] [--make_json MAKE_JSON]
                   [--search_html] [--extract_abb EXTRACT_ABB] [-l LOGLEVEL] [-f LOGFILE]

Welcome to docanalysis version 0.2.0. -h or --help for help

optional arguments:
  -h, --help            show this help message and exit
  --run_pygetpapers     [Command] downloads papers from EuropePMC via pygetpapers
  --make_section        [Command] makes sections; requires a fulltext.xml in CTree directories
  -q QUERY, --query QUERY
                        [pygetpapers] query string
  -k HITS, --hits HITS  [pygetpapers] number of papers to download
  --project_name PROJECT_NAME
                        CProject directory name
  -d [DICTIONARY [DICTIONARY ...]], --dictionary [DICTIONARY [DICTIONARY ...]]
                        [file name/url] existing ami dictionary to annotate sentences or support supervised entity extraction
  -o OUTPUT, --output OUTPUT
                        outputs csv with sentences/terms
  --make_ami_dict MAKE_AMI_DICT
                        [Command] title for ami-dict. Makes ami-dict of all extracted entities; works only with spacy
  --search_section [SEARCH_SECTION [SEARCH_SECTION ...]]
                        [NER/dictionary search] section(s) to annotate. Choose from: ALL, ACK, AFF, AUT, CON, DIS, ETH, FIG, INT, KEY, MET, RES, TAB,
                        TIL. Defaults to ALL
  --entities [ENTITIES [ENTITIES ...]]
                        [NER] entities to extract. Default (ALL). Common entities SpaCy: GPE, LANGUAGE, ORG, PERSON (for additional ones check: );
                        SciSpaCy: CHEMICAL, DISEASE
  --spacy_model SPACY_MODEL
                        [NER] optional. Choose between spacy or scispacy models. Defaults to spacy
  --html HTML           outputs html with sentences/terms
  --synonyms SYNONYMS   annotate the corpus/sections with synonyms from ami-dict
  --make_json MAKE_JSON
                        outputs json with sentences/terms
  --search_html         searches html documents (mainly IPCC)
  --extract_abb EXTRACT_ABB
                        [Command] title for abb-ami-dict. Extracts abbreviations and expansions; makes ami-dict of all extracted entities
  -l LOGLEVEL, --loglevel LOGLEVEL
                        provide logging level. Example --log warning <<info,warning,debug,error,critical>>, default='info'
  -f LOGFILE, --logfile LOGFILE
                        saves log to specified file in output directory as well as printing to terminal
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % pygetpapers
usage: pygetpapers [-h] [--config CONFIG] [-v] [-q QUERY] [-o OUTPUT] [--save_query] [-x] [-p] [-s] [-z] [--references REFERENCES] [-n]
                   [--citations CITATIONS] [-l LOGLEVEL] [-f LOGFILE] [-k LIMIT] [-r] [-u] [--onlyquery] [-c] [--makehtml] [--synonym]
                   [--startdate STARTDATE] [--enddate ENDDATE] [--terms TERMS] [--notterms NOTTERMS] [--api API] [--filter FILTER]

Welcome to Pygetpapers version 1.2.3. -h or --help for help

optional arguments:
  -h, --help            show this help message and exit
  --config CONFIG       config file path to read query for pygetpapers
  -v, --version         output the version number
  -q QUERY, --query QUERY
                        query string transmitted to repository API. Eg. "Artificial Intelligence" or "Plant Parts". To escape special characters
                        within the quotes, use backslash. Incase of nested quotes, ensure that the initial quotes are double and the qutoes inside
                        are single. For eg: `'(LICENSE:"cc by" OR LICENSE:"cc-by") AND METHODS:"transcriptome assembly"' ` is wrong. We should
                        instead use `"(LICENSE:'cc by' OR LICENSE:'cc-by') AND METHODS:'transcriptome assembly'"`
  -o OUTPUT, --output OUTPUT
                        output directory (Default: Folder inside current working directory named )
  --save_query          saved the passed query in a config file
  -x, --xml             download fulltext XMLs if available or save metadata as XML
  -p, --pdf             [E][A] download fulltext PDFs if available (only eupmc and arxiv supported)
  -s, --supp            [E] download supplementary files if available (only eupmc supported)
  -z, --zip             [E] download files from ftp endpoint if available (only eupmc supported)
  --references REFERENCES
                        [E] Download references if available. (only eupmc supported)Requires source for references
                        (AGR,CBA,CTX,ETH,HIR,MED,PAT,PMC,PPR).
  -n, --noexecute       [ALL] report how many results match the query, but don't actually download anything
  --citations CITATIONS
                        [E] Download citations if available (only eupmc supported). Requires source for citations
                        (AGR,CBA,CTX,ETH,HIR,MED,PAT,PMC,PPR).
  -l LOGLEVEL, --loglevel LOGLEVEL
                        [All] Provide logging level. Example --log warning <<info,warning,debug,error,critical>>, default='info'
  -f LOGFILE, --logfile LOGFILE
                        [All] save log to specified file in output directory as well as printing to terminal
  -k LIMIT, --limit LIMIT
                        [All] maximum number of hits (default: 100)
  -r, --restart         [E] Downloads the missing flags for the corpus.Searches for already existing corpus in the output directory
  -u, --update          [E][B][M][C] Updates the corpus by downloading new papers. Requires -k or --limit (If not provided, default will be used) and
                        -q or --query (must be provided) to be given. Searches for already existing corpus in the output directory
  --onlyquery           [E] Saves json file containing the result of the query in storage. (only eupmc supported) The json file can be given to
                        --restart to download the papers later.
  -c, --makecsv         [All] Stores the per-document metadata as csv.
  --makehtml            [All] Stores the per-document metadata as html.
  --synonym             [E] Results contain synonyms as well.
  --startdate STARTDATE
                        [E][B][M] Gives papers starting from given date. Format: YYYY-MM-DD
  --enddate ENDDATE     [E][B][M] Gives papers till given date. Format: YYYY-MM-DD
  --terms TERMS         [All] Location of the file which contains terms serperated by a comma or an ami dict which will be OR'ed among themselves and
                        AND'ed with the query
  --notterms NOTTERMS   [All] Location of the txt file which contains terms separated by a comma or an ami dict which will be OR'ed among themselves
                        and NOT'ed with the query
  --api API             API to search [europe_pmc, crossref,arxiv,biorxiv,medrxiv,rxivist] (default: europe_pmc)
  --filter FILTER       [C] filter by key value pair (only crossref supported)
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % py4ami
Traceback (most recent call last):
  File "/usr/local/bin/py4ami", line 5, in <module>
    from py4ami.pyamix import main
  File "/usr/local/lib/python3.8/site-packages/py4ami/pyamix.py", line 18, in <module>
    from py4ami.ami_convert import ConvType, Converters
  File "/usr/local/lib/python3.8/site-packages/py4ami/ami_convert.py", line 11, in <module>
    from py4ami.ami_gui import Gutil
  File "/usr/local/lib/python3.8/site-packages/py4ami/ami_gui.py", line 21, in <module>
    from py4ami.search_lib import AmiSearch, AmiSection, AmiDictionaries, AmiProjects
  File "/usr/local/lib/python3.8/site-packages/py4ami/search_lib.py", line 25, in <module>
    from py4ami.ami_project import AmiProjects
  File "/usr/local/lib/python3.8/site-packages/py4ami/ami_project.py", line 15, in <module>
    from py4ami.ami_pdf import PDFArgs
  File "/usr/local/lib/python3.8/site-packages/py4ami/ami_pdf.py", line 35, in <module>
    from py4ami.bbox_copy import BBox  # this is horrid, but I don't have a library
  File "/usr/local/lib/python3.8/site-packages/py4ami/bbox_copy.py", line 4, in <module>
    from pyamiimage.ami_util import AmiUtil
ModuleNotFoundError: No module named 'pyamiimage'
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
  [Restored Nov 13, 2022 at 7:16:10 PM]
Last login: Sun Nov 13 19:16:10 on ttys003
Restored session: Sun 13 Nov 2022 19:14:28 EST
emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
  [Restored Nov 13, 2022 at 7:30:38 PM]
Last login: Sun Nov 13 19:30:38 on ttys003
Restored session: Sun 13 Nov 2022 19:29:15 EST
emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
  [Restored Nov 13, 2022 at 7:47:00 PM]
Last login: Sun Nov 13 19:47:00 on ttys003
Restored session: Sun 13 Nov 2022 19:44:59 EST
emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % py4ami
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/bin/py4ami", line 33, in <module>
    sys.exit(load_entry_point('py4ami==0.0.40', 'console_scripts', 'py4ami')())
  File "/Library/Frameworks/Python.framework/Versions/3.8/bin/py4ami", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami/pyamix.py", line 18, in <module>
    from py4ami.ami_convert import ConvType, Converters
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami/ami_convert.py", line 11, in <module>
    from py4ami.ami_gui import Gutil
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami/ami_gui.py", line 21, in <module>
    from py4ami.search_lib import AmiSearch, AmiSection, AmiDictionaries, AmiProjects
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami/search_lib.py", line 25, in <module>
    from py4ami.ami_project import AmiProjects
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami/ami_project.py", line 15, in <module>
    from py4ami.ami_pdf import PDFArgs
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami/ami_pdf.py", line 35, in <module>
    from py4ami.bbox_copy import BBox  # this is horrid, but I don't have a library
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami/bbox_copy.py", line 4, in <module>
    from pyamiimage.ami_util import AmiUtil
ModuleNotFoundError: No module named 'pyamiimage'
emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % source venv/bin/activate
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % py4ami -h
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/bin/py4ami", line 33, in <module>
    sys.exit(load_entry_point('py4ami==0.0.40', 'console_scripts', 'py4ami')())
  File "/Library/Frameworks/Python.framework/Versions/3.8/bin/py4ami", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami/pyamix.py", line 18, in <module>
    from py4ami.ami_convert import ConvType, Converters
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami/ami_convert.py", line 11, in <module>
    from py4ami.ami_gui import Gutil
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami/ami_gui.py", line 21, in <module>
    from py4ami.search_lib import AmiSearch, AmiSection, AmiDictionaries, AmiProjects
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami/search_lib.py", line 25, in <module>
    from py4ami.ami_project import AmiProjects
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami/ami_project.py", line 15, in <module>
    from py4ami.ami_pdf import PDFArgs
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami/ami_pdf.py", line 35, in <module>
    from py4ami.bbox_copy import BBox  # this is horrid, but I don't have a library
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami/bbox_copy.py", line 4, in <module>
    from pyamiimage.ami_util import AmiUtil
ModuleNotFoundError: No module named 'pyamiimage'
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % docanalysis
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_distutils_hack/__init__.py:36: UserWarning: Setuptools is replacing distutils.
  warnings.warn("Setuptools is replacing distutils.")
usage: docanalysis [-h] [--run_pygetpapers] [--make_section] [-q QUERY] [-k HITS] [--project_name PROJECT_NAME] [-d [DICTIONARY [DICTIONARY ...]]]
                   [-o OUTPUT] [--make_ami_dict MAKE_AMI_DICT] [--search_section [SEARCH_SECTION [SEARCH_SECTION ...]]]
                   [--entities [ENTITIES [ENTITIES ...]]] [--spacy_model SPACY_MODEL] [--html HTML] [--synonyms SYNONYMS] [--make_json MAKE_JSON]
                   [--search_html] [--extract_abb EXTRACT_ABB] [-l LOGLEVEL] [-f LOGFILE]

Welcome to docanalysis version 0.2.0. -h or --help for help

optional arguments:
  -h, --help            show this help message and exit
  --run_pygetpapers     [Command] downloads papers from EuropePMC via pygetpapers
  --make_section        [Command] makes sections; requires a fulltext.xml in CTree directories
  -q QUERY, --query QUERY
                        [pygetpapers] query string
  -k HITS, --hits HITS  [pygetpapers] number of papers to download
  --project_name PROJECT_NAME
                        CProject directory name
  -d [DICTIONARY [DICTIONARY ...]], --dictionary [DICTIONARY [DICTIONARY ...]]
                        [file name/url] existing ami dictionary to annotate sentences or support supervised entity extraction
  -o OUTPUT, --output OUTPUT
                        outputs csv with sentences/terms
  --make_ami_dict MAKE_AMI_DICT
                        [Command] title for ami-dict. Makes ami-dict of all extracted entities; works only with spacy
  --search_section [SEARCH_SECTION [SEARCH_SECTION ...]]
                        [NER/dictionary search] section(s) to annotate. Choose from: ALL, ACK, AFF, AUT, CON, DIS, ETH, FIG, INT, KEY, MET, RES, TAB,
                        TIL. Defaults to ALL
  --entities [ENTITIES [ENTITIES ...]]
                        [NER] entities to extract. Default (ALL). Common entities SpaCy: GPE, LANGUAGE, ORG, PERSON (for additional ones check: );
                        SciSpaCy: CHEMICAL, DISEASE
  --spacy_model SPACY_MODEL
                        [NER] optional. Choose between spacy or scispacy models. Defaults to spacy
  --html HTML           outputs html with sentences/terms
  --synonyms SYNONYMS   annotate the corpus/sections with synonyms from ami-dict
  --make_json MAKE_JSON
                        outputs json with sentences/terms
  --search_html         searches html documents (mainly IPCC)
  --extract_abb EXTRACT_ABB
                        [Command] title for abb-ami-dict. Extracts abbreviations and expansions; makes ami-dict of all extracted entities
  -l LOGLEVEL, --loglevel LOGLEVEL
                        provide logging level. Example --log warning <<info,warning,debug,error,critical>>, default='info'
  -f LOGFILE, --logfile LOGFILE
                        saves log to specified file in output directory as well as printing to terminal
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % getpapers

  Usage: getpapers [options]

  Options:

    -h, --help                output usage information
    -V, --version             output the version number
    -q, --query <query>       search query (required)
    -o, --outdir <path>       output directory (required - will be created if not found)
    --api <name>              API to search [eupmc, crossref, ieee, arxiv] (default: eupmc)
    -x, --xml                 download fulltext XMLs if available
    -p, --pdf                 download fulltext PDFs if available
    -s, --supp                download supplementary files if available
    -t, --minedterms          download text-mined terms if available
    -l, --loglevel <level>    amount of information to log (silent, verbose, info*, data, warn, error, or debug)
    -a, --all                 search all papers, not just open access
    -n, --noexecute           report how many results match the query, but don't actually download anything
    -f, --logfile <filename>  save log to specified file in output directory as well as printing to terminal
    -k, --limit <int>         limit the number of hits and downloads
    --filter <filter object>  filter by key value pair, passed straight to the crossref api only
    -r, --restart             restart file downloads after failure

(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % py4ami
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/bin/py4ami", line 33, in <module>
    sys.exit(load_entry_point('py4ami==0.0.40', 'console_scripts', 'py4ami')())
  File "/Library/Frameworks/Python.framework/Versions/3.8/bin/py4ami", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami/pyamix.py", line 18, in <module>
    from py4ami.ami_convert import ConvType, Converters
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami/ami_convert.py", line 11, in <module>
    from py4ami.ami_gui import Gutil
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami/ami_gui.py", line 21, in <module>
    from py4ami.search_lib import AmiSearch, AmiSection, AmiDictionaries, AmiProjects
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami/search_lib.py", line 25, in <module>
    from py4ami.ami_project import AmiProjects
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami/ami_project.py", line 15, in <module>
    from py4ami.ami_pdf import PDFArgs
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami/ami_pdf.py", line 35, in <module>
    from py4ami.bbox_copy import BBox  # this is horrid, but I don't have a library
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami/bbox_copy.py", line 4, in <module>
    from pyamiimage.ami_util import AmiUtil
ModuleNotFoundError: No module named 'pyamiimage'
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % pip install pyamiimage
Collecting pyamiimage
  Downloading pyamiimage-0.0.13.tar.gz (178 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 179.0/179.0 kB 1.7 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Requirement already satisfied: lxml in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from pyamiimage) (4.9.1)
Requirement already satisfied: matplotlib in ./Library/Python/3.8/lib/python/site-packages (from pyamiimage) (3.5.2)
Collecting networkx
  Downloading networkx-2.8.8-py3-none-any.whl (2.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 10.5 MB/s eta 0:00:00
Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from pyamiimage) (1.23.4)
Requirement already satisfied: Pillow in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from pyamiimage) (9.3.0)
Collecting pytesseract
  Downloading pytesseract-0.3.10-py3-none-any.whl (14 kB)
Collecting easyocr
  Downloading easyocr-1.6.2-py3-none-any.whl (2.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.9/2.9 MB 8.8 MB/s eta 0:00:00
Requirement already satisfied: pytest in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from pyamiimage) (6.2.5)
Collecting scikit_image
  Downloading scikit_image-0.19.3-cp38-cp38-macosx_10_13_x86_64.whl (13.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.2/13.2 MB 4.8 MB/s eta 0:00:00
Requirement already satisfied: scikit-learn in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from pyamiimage) (1.1.3)
Requirement already satisfied: setuptools in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from pyamiimage) (60.3.1)
Collecting skan
  Downloading skan-0.10.0-py3-none-any.whl (1.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5/1.5 MB 10.6 MB/s eta 0:00:00
Collecting sknw
  Downloading sknw-0.14.tar.gz (3.6 kB)
  Preparing metadata (setup.py) ... done
Collecting opencv-python-headless<=4.5.4.60
  Downloading opencv_python_headless-4.5.4.60-cp38-cp38-macosx_10_15_x86_64.whl (45.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 45.9/45.9 MB 6.2 MB/s eta 0:00:00
Collecting python-bidi
  Downloading python_bidi-0.4.2-py2.py3-none-any.whl (30 kB)
Collecting PyYAML
  Downloading PyYAML-6.0-cp38-cp38-macosx_10_9_x86_64.whl (192 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 192.2/192.2 kB 2.7 MB/s eta 0:00:00
Collecting pyclipper
  Downloading pyclipper-1.3.0.post3-cp38-cp38-macosx_10_9_x86_64.whl (133 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.9/133.9 kB 2.7 MB/s eta 0:00:00
Collecting Shapely
  Downloading Shapely-1.8.5.post1-cp38-cp38-macosx_10_9_x86_64.whl (1.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 8.1 MB/s eta 0:00:00
Collecting ninja
  Downloading ninja-1.11.1-py2.py3-none-macosx_10_9_universal2.macosx_10_9_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl (270 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 270.7/270.7 kB 5.1 MB/s eta 0:00:00
Collecting torch
  Downloading torch-1.13.0-cp38-none-macosx_10_9_x86_64.whl (137.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 137.6/137.6 MB 4.3 MB/s eta 0:00:00
Requirement already satisfied: scipy in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from easyocr->pyamiimage) (1.9.3)
Collecting torchvision>=0.5
  Downloading torchvision-0.14.0-cp38-cp38-macosx_10_9_x86_64.whl (1.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4/1.4 MB 10.7 MB/s eta 0:00:00
Requirement already satisfied: python-dateutil>=2.7 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from matplotlib->pyamiimage) (2.8.2)
Requirement already satisfied: packaging>=20.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from matplotlib->pyamiimage) (21.3)
Requirement already satisfied: pyparsing>=2.2.1 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from matplotlib->pyamiimage) (3.0.9)
Requirement already satisfied: cycler>=0.10 in ./Library/Python/3.8/lib/python/site-packages (from matplotlib->pyamiimage) (0.11.0)
Requirement already satisfied: fonttools>=4.22.0 in ./Library/Python/3.8/lib/python/site-packages (from matplotlib->pyamiimage) (4.33.3)
Requirement already satisfied: kiwisolver>=1.0.1 in ./Library/Python/3.8/lib/python/site-packages (from matplotlib->pyamiimage) (1.4.3)
Requirement already satisfied: attrs>=19.2.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from pytest->pyamiimage) (22.1.0)
Requirement already satisfied: toml in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from pytest->pyamiimage) (0.10.2)
Requirement already satisfied: py>=1.8.2 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from pytest->pyamiimage) (1.11.0)
Requirement already satisfied: pluggy<2.0,>=0.12 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from pytest->pyamiimage) (1.0.0)
Requirement already satisfied: iniconfig in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from pytest->pyamiimage) (1.1.1)
Collecting PyWavelets>=1.1.1
  Downloading PyWavelets-1.4.1-cp38-cp38-macosx_10_13_x86_64.whl (4.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.3/4.3 MB 10.2 MB/s eta 0:00:00
Collecting imageio>=2.4.1
  Downloading imageio-2.22.4-py3-none-any.whl (3.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.4/3.4 MB 6.7 MB/s eta 0:00:00
Collecting tifffile>=2019.7.26
  Downloading tifffile-2022.10.10-py3-none-any.whl (210 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 210.3/210.3 kB 4.3 MB/s eta 0:00:00
Requirement already satisfied: threadpoolctl>=2.0.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from scikit-learn->pyamiimage) (3.1.0)
Requirement already satisfied: joblib>=1.0.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from scikit-learn->pyamiimage) (1.2.0)
Requirement already satisfied: pandas>=1.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from skan->pyamiimage) (1.3.4)
Collecting toolz>=0.10.0
  Downloading toolz-0.12.0-py3-none-any.whl (55 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 55.8/55.8 kB 1.8 MB/s eta 0:00:00
Requirement already satisfied: tqdm>=4.56.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from skan->pyamiimage) (4.62.3)
Collecting openpyxl>=2.4
  Downloading openpyxl-3.0.10-py2.py3-none-any.whl (242 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 242.1/242.1 kB 2.8 MB/s eta 0:00:00
Collecting numpydoc>=0.9.2
  Downloading numpydoc-1.5.0-py3-none-any.whl (52 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 52.4/52.4 kB 1.7 MB/s eta 0:00:00
Collecting numba>=0.50
  Downloading numba-0.56.4-cp38-cp38-macosx_10_14_x86_64.whl (2.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.4/2.4 MB 11.3 MB/s eta 0:00:00
Collecting importlib-metadata
  Downloading importlib_metadata-5.0.0-py3-none-any.whl (21 kB)
Collecting llvmlite<0.40,>=0.39.0dev0
  Downloading llvmlite-0.39.1-cp38-cp38-macosx_10_9_x86_64.whl (25.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 25.5/25.5 MB 9.6 MB/s eta 0:00:00
Requirement already satisfied: Jinja2>=2.10 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from numpydoc>=0.9.2->skan->pyamiimage) (3.1.2)
Collecting sphinx>=4.2
  Downloading sphinx-5.3.0-py3-none-any.whl (3.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 6.6 MB/s eta 0:00:00
Collecting et-xmlfile
  Downloading et_xmlfile-1.1.0-py3-none-any.whl (4.7 kB)
Requirement already satisfied: pytz>=2017.3 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from pandas>=1.0->skan->pyamiimage) (2022.6)
Requirement already satisfied: six>=1.5 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from python-dateutil>=2.7->matplotlib->pyamiimage) (1.16.0)
Requirement already satisfied: typing-extensions in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from torchvision>=0.5->easyocr->pyamiimage) (4.4.0)
Requirement already satisfied: requests in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from torchvision>=0.5->easyocr->pyamiimage) (2.28.1)
Requirement already satisfied: MarkupSafe>=2.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from Jinja2>=2.10->numpydoc>=0.9.2->skan->pyamiimage) (2.1.1)
Collecting sphinxcontrib-devhelp
  Downloading sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl (84 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 84.7/84.7 kB 1.7 MB/s eta 0:00:00
Collecting imagesize>=1.3
  Downloading imagesize-1.4.1-py2.py3-none-any.whl (8.8 kB)
Collecting sphinxcontrib-applehelp
  Downloading sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl (121 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 121.2/121.2 kB 2.9 MB/s eta 0:00:00
Collecting babel>=2.9
  Downloading Babel-2.11.0-py3-none-any.whl (9.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.5/9.5 MB 8.0 MB/s eta 0:00:00
Collecting sphinxcontrib-jsmath
  Downloading sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl (5.1 kB)
Collecting sphinxcontrib-serializinghtml>=1.1.5
  Downloading sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl (94 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 94.0/94.0 kB 3.1 MB/s eta 0:00:00
Collecting sphinxcontrib-qthelp
  Downloading sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl (90 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.6/90.6 kB 3.0 MB/s eta 0:00:00
Collecting Pygments>=2.12
  Using cached Pygments-2.13.0-py3-none-any.whl (1.1 MB)
Collecting docutils<0.20,>=0.14
  Using cached docutils-0.19-py3-none-any.whl (570 kB)
Collecting alabaster<0.8,>=0.7
  Downloading alabaster-0.7.12-py2.py3-none-any.whl (14 kB)
Collecting sphinxcontrib-htmlhelp>=2.0.0
  Downloading sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl (100 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100.5/100.5 kB 3.4 MB/s eta 0:00:00
Collecting snowballstemmer>=2.0
  Downloading snowballstemmer-2.2.0-py2.py3-none-any.whl (93 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 93.0/93.0 kB 3.1 MB/s eta 0:00:00
Collecting zipp>=0.5
  Downloading zipp-3.10.0-py3-none-any.whl (6.2 kB)
Requirement already satisfied: certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from requests->torchvision>=0.5->easyocr->pyamiimage) (2022.9.24)
Requirement already satisfied: idna<4,>=2.5 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from requests->torchvision>=0.5->easyocr->pyamiimage) (3.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from requests->torchvision>=0.5->easyocr->pyamiimage) (1.26.12)
Requirement already satisfied: charset-normalizer<3,>=2 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from requests->torchvision>=0.5->easyocr->pyamiimage) (2.1.1)
Installing collected packages: snowballstemmer, pyclipper, ninja, alabaster, zipp, torch, toolz, tifffile, sphinxcontrib-serializinghtml, sphinxcontrib-qthelp, sphinxcontrib-jsmath, sphinxcontrib-htmlhelp, sphinxcontrib-devhelp, sphinxcontrib-applehelp, Shapely, PyYAML, PyWavelets, python-bidi, Pygments, opencv-python-headless, networkx, llvmlite, imagesize, imageio, et-xmlfile, docutils, babel, torchvision, scikit_image, pytesseract, openpyxl, importlib-metadata, sphinx, numba, easyocr, sknw, numpydoc, skan, pyamiimage
  DEPRECATION: sknw is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for sknw ... done
  DEPRECATION: pyamiimage is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for pyamiimage ... done
Successfully installed PyWavelets-1.4.1 PyYAML-6.0 Pygments-2.13.0 Shapely-1.8.5.post1 alabaster-0.7.12 babel-2.11.0 docutils-0.19 easyocr-1.6.2 et-xmlfile-1.1.0 imageio-2.22.4 imagesize-1.4.1 importlib-metadata-5.0.0 llvmlite-0.39.1 networkx-2.8.8 ninja-1.11.1 numba-0.56.4 numpydoc-1.5.0 opencv-python-headless-4.5.4.60 openpyxl-3.0.10 pyamiimage-0.0.13 pyclipper-1.3.0.post3 pytesseract-0.3.10 python-bidi-0.4.2 scikit_image-0.19.3 skan-0.10.0 sknw-0.14 snowballstemmer-2.2.0 sphinx-5.3.0 sphinxcontrib-applehelp-1.0.2 sphinxcontrib-devhelp-1.0.2 sphinxcontrib-htmlhelp-2.0.0 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.3 sphinxcontrib-serializinghtml-1.1.5 tifffile-2022.10.10 toolz-0.12.0 torch-1.13.0 torchvision-0.14.0 zipp-3.10.0
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % py4ami
WARNING:symbol.ini: environment variable $PYAMI_HOME not set, defaulting to bundled config.ini in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami
WARNING:pyami:No args, running --help
usage: py4ami [-h] [--version] {DICT,GUI,HTML,PDF,PROJECT} ...

Py4AMI: create, manipulate, use CProject 
----------------------------------------

Py4AMI is the largest collection of functionality in the AMI system.It contains executable code and libraries to manage complex documents.
A key structure is the corpus (CProject directory) which contains a list of subdirectories (CTrees) which themselves contain many different document features (text, tables, images, graphics.
Py4AMI can create, fill, manipulate, transform many of the components including PDF, HTML, TXT, images, CSV.

The subcommands:

  DICT <options>      # create/edit/search dictionaries
  GUI <options>       # run tkinter GUI (prototype)
  HTML <options>      # create/edit HTML
  PDF <options>       # convert PDF into HTML and images
  PROJECT <options>   # create and transform a corpus of documents

After installation, run 
  py4ami <subcommand> <options>

Examples (# foo is a comment):
  py4ami        # runs help
  py4ami -h     # runs help
  py4ami PDF -h # runs PDF help
  py4ami PDF --makehtml --infile foo.pdf --outdir bar/ # converts PDF to HTML
  py4ami PROJECT --project foodir/ # converts all PDF in foodir to CTrees

----------------------------------------

positional arguments:
  {DICT,GUI,HTML,PDF,PROJECT}
                        subcommands

optional arguments:
  -h, --help            show this help message and exit
  --version             show version 0.0.40

run:
        py4ami <subcommand> <args>
          where subcommand is in   {DICT,GUI,HTML,PDF,PROJECT} and args depend on subcommand

(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % py4ami -help
WARNING:symbol.ini: environment variable $PYAMI_HOME not set, defaulting to bundled config.ini in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami
usage: py4ami [-h] [--version] {DICT,GUI,HTML,PDF,PROJECT} ...
py4ami: error: argument -h/--help: ignored explicit argument 'elp'
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/bin/py4ami", line 33, in <module>
    sys.exit(load_entry_point('py4ami==0.0.40', 'console_scripts', 'py4ami')())
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami/pyamix.py", line 1253, in main
    pyamix.run_command(sys.argv[1:])
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami/pyamix.py", line 342, in run_command
    self.parse_and_run_args(args)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami/pyamix.py", line 357, in parse_and_run_args
    self.args = self.make_substitutions_create_arg_tuples(arglist, parser)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami/pyamix.py", line 533, in make_substitutions_create_arg_tuples
    raise ValueError(f"bad command arguments {parsed_args} (see log output)")
ValueError: bad command arguments SystemExitFail_2 (see log output)
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % 
(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % py4ami --help
WARNING:symbol.ini: environment variable $PYAMI_HOME not set, defaulting to bundled config.ini in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami
usage: py4ami [-h] [--version] {DICT,GUI,HTML,PDF,PROJECT} ...

Py4AMI: create, manipulate, use CProject 
----------------------------------------

Py4AMI is the largest collection of functionality in the AMI system.It contains executable code and libraries to manage complex documents.
A key structure is the corpus (CProject directory) which contains a list of subdirectories (CTrees) which themselves contain many different document features (text, tables, images, graphics.
Py4AMI can create, fill, manipulate, transform many of the components including PDF, HTML, TXT, images, CSV.

The subcommands:

  DICT <options>      # create/edit/search dictionaries
  GUI <options>       # run tkinter GUI (prototype)
  HTML <options>      # create/edit HTML
  PDF <options>       # convert PDF into HTML and images
  PROJECT <options>   # create and transform a corpus of documents

After installation, run 
  py4ami <subcommand> <options>

Examples (# foo is a comment):
  py4ami        # runs help
  py4ami -h     # runs help
  py4ami PDF -h # runs PDF help
  py4ami PDF --makehtml --infile foo.pdf --outdir bar/ # converts PDF to HTML
  py4ami PROJECT --project foodir/ # converts all PDF in foodir to CTrees

----------------------------------------

positional arguments:
  {DICT,GUI,HTML,PDF,PROJECT}
                        subcommands

optional arguments:
  -h, --help            show this help message and exit
  --version             show version 0.0.40

run:
        py4ami <subcommand> <args>
          where subcommand is in   {DICT,GUI,HTML,PDF,PROJECT} and args depend on subcommand

(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ % py4ami -h
WARNING:symbol.ini: environment variable $PYAMI_HOME not set, defaulting to bundled config.ini in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/py4ami
usage: py4ami [-h] [--version] {DICT,GUI,HTML,PDF,PROJECT} ...

Py4AMI: create, manipulate, use CProject 
----------------------------------------

Py4AMI is the largest collection of functionality in the AMI system.It contains executable code and libraries to manage complex documents.
A key structure is the corpus (CProject directory) which contains a list of subdirectories (CTrees) which themselves contain many different document features (text, tables, images, graphics.
Py4AMI can create, fill, manipulate, transform many of the components including PDF, HTML, TXT, images, CSV.

The subcommands:

  DICT <options>      # create/edit/search dictionaries
  GUI <options>       # run tkinter GUI (prototype)
  HTML <options>      # create/edit HTML
  PDF <options>       # convert PDF into HTML and images
  PROJECT <options>   # create and transform a corpus of documents

After installation, run 
  py4ami <subcommand> <options>

Examples (# foo is a comment):
  py4ami        # runs help
  py4ami -h     # runs help
  py4ami PDF -h # runs PDF help
  py4ami PDF --makehtml --infile foo.pdf --outdir bar/ # converts PDF to HTML
  py4ami PROJECT --project foodir/ # converts all PDF in foodir to CTrees

----------------------------------------

positional arguments:
  {DICT,GUI,HTML,PDF,PROJECT}
                        subcommands

optional arguments:
  -h, --help            show this help message and exit
  --version             show version 0.0.40

run:
        py4ami <subcommand> <args>
          where subcommand is in   {DICT,GUI,HTML,PDF,PROJECT} and args depend on subcommand

(venv) emanuelfarruda@Mannys-MacBook-Pro-2021 ~ %