ScalaConsultants / Aspect-Based-Sentiment-Analysis

💭 Aspect-Based-Sentiment-Analysis: Transformer & Explainable ML (TensorFlow)
Apache License 2.0
543 stars 90 forks source link

Package is not compatible with Python 3.8 #59

Open xesaad opened 3 years ago

xesaad commented 3 years ago

Hi there 😄

I have been successfully using aspect_based_sentiment_analysis==2.0.2 on Python3.8.5. However, I am unable to install the newer version 2.0.3 with pip because the required Python version is pinned to 3.7.

Is this intentional or should the package also support newer versions of Python?

Thanks very much for your help - it is appreciated! 👍🏼

rspiewak47 commented 3 years ago

I was able to make this work with Python 3.8.8 64-bit version. In this case, I also commented out some google imports, and had to re-install some latest versions after upgrading pip. Here is the list from pip: Package Version


absl-py 0.13.0 astunparse 1.6.3 backcall 0.2.0 beautifulsoup4 4.9.3 blis 0.7.4 cachetools 4.2.2 catalogue 2.0.6 certifi 2021.5.30 charset-normalizer 2.0.4 clang 5.0 click 7.1.2 colorama 0.4.4 cymem 2.0.5 decorator 5.0.9 filelock 3.0.12 flatbuffers 1.12 gast 0.4.0 google-auth 1.35.0 google-auth-oauthlib 0.4.5 google-cloud 0.34.0 google-pasta 0.2.0 grpcio 1.39.0 h5py 3.1.0 huggingface-hub 0.0.12 idna 3.2 ipython 7.26.0 ipython-genutils 0.2.0 jedi 0.18.0 Jinja2 3.0.1 joblib 1.0.1 keras 2.6.0 Keras-Preprocessing 1.1.2 lxml 4.6.3 Markdown 3.3.4 MarkupSafe 2.0.1 matplotlib-inline 0.1.2 murmurhash 1.0.5 numpy 1.19.5 oauthlib 3.1.1 opt-einsum 3.3.0 packaging 21.0 parso 0.8.2 pathy 0.6.0 pickleshare 0.7.5 pip 21.2.4 preshed 3.0.5 prompt-toolkit 3.0.20 protobuf 3.17.3 pyasn1 0.4.8 pyasn1-modules 0.2.8 pydantic 1.8.2 Pygments 2.10.0 pyparsing 2.4.7 PyYAML 5.4.1 regex 2021.8.21 requests 2.26.0 requests-oauthlib 1.3.0 rsa 4.7.2 sacremoses 0.0.45 setuptools 49.2.1 six 1.15.0 smart-open 5.2.0 soupsieve 2.2.1 spacy 3.1.2 spacy-legacy 3.0.8 srsly 2.4.1 tensorboard 2.6.0 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.8.0 tensorflow 2.6.0 tensorflow-estimator 2.6.0 termcolor 1.1.0 thinc 8.0.8 tokenizers 0.10.3 tqdm 4.62.2 transformers 4.9.2 typer 0.3.2 typing-extensions 3.7.4.3 urllib3 1.26.6 wasabi 0.8.2 wcwidth 0.2.5 Werkzeug 2.0.1 wheel 0.37.0 wrapt 1.12.1

xesaad commented 3 years ago

I was able to make this work with Python 3.8.8 64-bit version. In this case, I also commented out some google imports, and had to re-install some latest versions after upgrading pip. Here is the list from pip: Package Version

absl-py 0.13.0 astunparse 1.6.3 backcall 0.2.0 beautifulsoup4 4.9.3 blis 0.7.4 cachetools 4.2.2 catalogue 2.0.6 certifi 2021.5.30 charset-normalizer 2.0.4 clang 5.0 click 7.1.2 colorama 0.4.4 cymem 2.0.5 decorator 5.0.9 filelock 3.0.12 flatbuffers 1.12 gast 0.4.0 google-auth 1.35.0 google-auth-oauthlib 0.4.5 google-cloud 0.34.0 google-pasta 0.2.0 grpcio 1.39.0 h5py 3.1.0 huggingface-hub 0.0.12 idna 3.2 ipython 7.26.0 ipython-genutils 0.2.0 jedi 0.18.0 Jinja2 3.0.1 joblib 1.0.1 keras 2.6.0 Keras-Preprocessing 1.1.2 lxml 4.6.3 Markdown 3.3.4 MarkupSafe 2.0.1 matplotlib-inline 0.1.2 murmurhash 1.0.5 numpy 1.19.5 oauthlib 3.1.1 opt-einsum 3.3.0 packaging 21.0 parso 0.8.2 pathy 0.6.0 pickleshare 0.7.5 pip 21.2.4 preshed 3.0.5 prompt-toolkit 3.0.20 protobuf 3.17.3 pyasn1 0.4.8 pyasn1-modules 0.2.8 pydantic 1.8.2 Pygments 2.10.0 pyparsing 2.4.7 PyYAML 5.4.1 regex 2021.8.21 requests 2.26.0 requests-oauthlib 1.3.0 rsa 4.7.2 sacremoses 0.0.45 setuptools 49.2.1 six 1.15.0 smart-open 5.2.0 soupsieve 2.2.1 spacy 3.1.2 spacy-legacy 3.0.8 srsly 2.4.1 tensorboard 2.6.0 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.8.0 tensorflow 2.6.0 tensorflow-estimator 2.6.0 termcolor 1.1.0 thinc 8.0.8 tokenizers 0.10.3 tqdm 4.62.2 transformers 4.9.2 typer 0.3.2 typing-extensions 3.7.4.3 urllib3 1.26.6 wasabi 0.8.2 wcwidth 0.2.5 Werkzeug 2.0.1 wheel 0.37.0 wrapt 1.12.1

Hi @rspiewak47 , thanks very much for the response and for the helpful details about the dependency versions 👍🏼 The issue I have is that I am unable to install aspect_based_sentiment_analysis==2.0.3 using pip on Python 3.8, because 2.0.3 does not exist as a Python 3.8 package, only as a Python 3.7 package (please correct me if I am wrong on this!).

In more detail, when I run pip install aspect_based_sentiment_analysis==2.0.3 on Python 3.8 (running inside a Docker container), I receive the following error:

ERROR: Could not find a version that satisfies the requirement aspect_based_sentiment_analysis==2.0.3 (from -r requirements.txt (line 1)) (from versions: 1.0.1, 1.1.0, 1.1.1, 1.1.2, 2.0.0, 2.0.1, 2.0.2)
ERROR: No matching distribution found for aspect_based_sentiment_analysis==2.0.3 (from -r requirements.txt (line 1))

When I downgraded the Python version to 3.7 inside the container I no longer received the error, and I guess that is because pip could find the required distribution in that case.

rspiewak47 commented 3 years ago

As I recall, I upgraded the version of Python I was using in place after downloading this. I then modified the paths to reflect the Python version I wanted, and then had to re-run pip installation of many dependencies (including upgrading pip) - leaving out versions in many cases so that pip selected the most recent version instead of the "required" version. Not the cleanest way, but so far it's working. Now, I'm trying to figure out how to potentially add some words and phrases with sentiment attached for a specific vocabulary.

xesaad commented 3 years ago

Thank you for the explanation! That makes sense, and the changes you are considering sound very cool 😃

Just to clarify, is there a specific reason that you pinned the version to 3.7 in this commit? (Rather than setting it as a lower bound?)

I believe the issue could be fixed by instead setting

python_requires='>=3.7.0',

so that the distribution would still be available for users of later Python versions. If you don't mind, I would be happy to submit a PR for this.

rspiewak47 commented 3 years ago

Your question about versions is one for the owners of this repo. I'm simply a user.

xesaad commented 3 years ago

Sorry @rspiewak47! For some reason I thought you were one of the owners. My apologies!

xesaad commented 3 years ago

Suggestion:

I tried to open a PR to add these suggestions myself, but I do not have push access to this repo.

DrumsnChocolate commented 2 years ago

Okay, since there's a fix for this, is there any idea when this PR will be accepted?

clickio commented 2 years ago

you can always fork it, make your changes and install from your own repo with pip git+your_repo_here/package_name.git

On Thu, Dec 2, 2021 at 4:26 PM Matteo Bronkhorst @.***> wrote:

Okay, since there's a fix for this, is there any idea when this PR will be accepted?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ScalaConsultants/Aspect-Based-Sentiment-Analysis/issues/59#issuecomment-984675782, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASJXA65KASOKO6MAEHJL53UO56ZJANCNFSM5B2GLBYA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.