FraBle / python-sutime

Python wrapper for Stanford CoreNLP's SUTime
GNU General Public License v3.0
153 stars 43 forks source link

Error while trsing to use the installation procedure from documentation at pypi #55

Open Boldie opened 3 years ago

Boldie commented 3 years ago
$ python -c 'import importlib; import pathlib; print(pathlib.Path(importlib.util.find_spec("sutime").origin).parent / "pom.xml")'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: module 'importlib' has no attribute 'util'

Python Version is 3.8.5 on Ubuntu 20.04.2

Boldie commented 3 years ago

The following line will work, so the doc shall be updated to this:

python -c 'import importlib; from importlib import util; import pathlib; print(pathlib.Path(util.find_spec("sutime").origin).parent / "pom.xml")'
sukhboldt-rp commented 3 years ago

you can also just change import importlib part to import importlib.util

rickyking commented 1 year ago
mvn dependency:copy-dependencies -DoutputDirectory=./jars -f $(python -c 'import importlib; from importlib import util; import pathlib; print(pathlib.Path(util.find_spec("sutime").origin).parent / "pom.xml")')