ScalaConsultants / Aspect-Based-Sentiment-Analysis

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

Can't install the package on Ubuntu 18.04 with Python 3.7.5 #13

Closed stevesolun closed 3 years ago

stevesolun commented 3 years ago

I am doing the following:

sudo pip3 install aspect-based-sentiment-analysis

Failing with tensorflow:

Collecting tensorflow>=2.1 (from aspect-based-sentiment-analysis) Could not find a version that satisfies the requirement tensorflow>=2.1

Please advise how can I install it on Ubuntu 18.04 with Python 3.7.5.

I can do it smoothly on Windows 10, but I need it on my work laptop.

tobiasblasberg commented 3 years ago

I am not part of the dev team, but I am using ubuntu 18.04 on Docker with Python 3.7.8 as well and installation worked. Maybe try installing the following requirements first:

This is just a first guess. Besides, an error log would be helpful... Best, Tobias

stevesolun commented 3 years ago

@tobiasblasberg Here is it:

sudo pip3 install aspect-based-sentiment-analysis 
The directory '/vg1/lv1/ssolun/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/ssolun/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting aspect-based-sentiment-analysis
  Downloading https://files.pythonhosted.org/packages/d6/8a/27940b9808fc5c68767fe346bc5b5a14e63a063b4173e9798f8abd7ea79c/aspect_based_sentiment_analysis-1.1.2-py3-none-any.whl (42kB)
    100% |████████████████████████████████| 51kB 7.3MB/s 
Collecting transformers>=2.5 (from aspect-based-sentiment-analysis)
  Downloading https://files.pythonhosted.org/packages/27/3c/91ed8f5c4e7ef3227b4119200fc0ed4b4fd965b1f0172021c25701087825/transformers-3.0.2-py3-none-any.whl (769kB)
    100% |████████████████████████████████| 778kB 1.6MB/s 
Requirement already satisfied: scikit-learn in /usr/local/lib/python3.7/dist-packages (from aspect-based-sentiment-analysis)
Requirement already satisfied: google-cloud-storage in /usr/local/lib/python3.7/dist-packages (from aspect-based-sentiment-analysis)
Collecting tensorflow>=2.1 (from aspect-based-sentiment-analysis)
  Could not find a version that satisfies the requirement tensorflow>=2.1 (from aspect-based-sentiment-analysis) (from versions: 1.13.0rc1, 1.13.0rc2, 1.13.1, 1.13.2, 1.14.0rc0, 1.14.0rc1, 1.14.0, 2.0.0a0, 2.0.0b0, 2.0.0b1)
No matching distribution found for tensorflow>=2.1 (from aspect-based-sentiment-analysis)
tobiasblasberg commented 3 years ago

Seems like the prerequisite tensorflow is not installed.

Could you try to pip install tensorflow 2.2.0 before the package? If that is not working the output of pip freeze would be helpful as well to narrow down the problem.

As posted above, I would start with pip installing all other packages before. From the output you posted it seems that transformers was not installed before neither was tensorflow.

Best, Tobias

stevesolun commented 3 years ago

Why did you close it @rolczynski ? I am going to share the info @tobiasblasberg asked for shortly.

stevesolun commented 3 years ago

@tobiasblasberg Could you try to pip install tensorflow 2.2.0 before the package? Still can't do this - same error as before.

If that is not working the output of pip freeze would be helpful as well to narrow down the problem. Provided.

As posted above, I would start with pip installing all other packages before. From the output you posted it seems that transformers was not installed before neither was tensorflow. Done, nothing changed.

Here is the updated pip and pip3 freeze:

pip3 freeze

absl-py==0.10.0
aiohttp==3.6.2
alabaster==0.7.12
alembic==1.4.2
aplus==0.11.0
appdirs==1.4.3
argo-models==2.2.1a0
arrow==0.15.5
asn1crypto==0.24.0
astor==0.8.1
astroid==2.4.1
astropy==4.0.1.post1
async-timeout==3.0.1
attrs==19.3.0
Automat==0.6.0
autopep8==1.5
awscli==1.16.168
Babel==2.8.0
backcall==0.1.0
beautifulsoup4==4.9.1
black==19.10b0
bleach==3.1.5
blinker==1.4
blis==0.4.1
bokeh==2.1.1
boto3==1.12.43
botocore==1.13.39
bqplot==0.12.13
branca==0.4.1
bump2version==1.0.0
bumpversion==0.6.0
cachetools==4.1.0
catalogue==1.0.0
certifi==2020.4.5.2
cffi==1.14.0
chardet==3.0.4
click==7.1.1
cliff==3.4.0
cloud-init==20.2
cloudpickle==1.1.1
cmaes==0.6.0
cmd2==1.3.4
colorama==0.3.9
colorlog==4.2.1
configobj==5.0.6
configparser==5.0.0
constantly==15.1.0
contractions==0.0.25
coverage==5.2
cryptography==2.9.2
cupshelpers==1.0
cycler==0.10.0
cymem==2.0.3
Cython==0.29.17
dask==2.17.0
dateparser==0.7.4
decorator==4.4.2
defer==1.0.6
defusedxml==0.6.0
Deprecated==1.2.10
deprecation==2.1.0
dialogflow==0.7.2
distributed==2.23.0
distro-info===0.18ubuntu0.18.04.1
docopt==0.6.2
docutils==0.15.2
dpath==2.0.1
easyocr==1.1.3
elyra==0.10.3
en-core-web-sm==2.2.5
entrypoints==0.3
filelock==3.0.12
flake8==3.8.3
Flask==1.1.1
Flask-Caching==1.8.0
fsspec==0.8.0
future==0.17.1
fuzzyset==0.0.19
fuzzywuzzy==0.17.0
gast==0.4.0
gitdb==4.0.5
gitdb2==3.0.0
GitPython==3.1.2
google==2.0.3
google-api-core==1.16.0
google-api-python-client==1.8.0
google-auth==1.16.1
google-auth-httplib2==0.0.3
google-auth-oauthlib==0.4.1
google-cloud-core==1.3.0
google-cloud-storage==1.29.0
google-pasta==0.2.0
google-play-scraper==0.1
google-resumable-media==0.5.1
googleapis-common-protos==1.51.0
grpcio==1.31.0
gunicorn==20.0.4
h5py==2.10.0
HeapDict==1.0.1
hibagent==1.0.1
html2text==2020.1.16
httplib2==0.17.0
humanize==2.0.0
hurry==1.1
hyperlink==17.3.1
icalendar==4.0.3
idna==2.9
imageio==2.9.0
imagesize==1.2.0
importlib-metadata==1.7.0
incremental==16.10.1
iniconfig==1.0.1
ipydatawidgets==4.0.1
ipykernel==5.3.0
ipyleaflet==0.13.1
ipympl==0.5.6
ipython==7.15.0
ipython-genutils==0.2.0
ipyvolume==0.5.2
ipyvue==1.3.3
ipyvuetify==1.4.0
ipywebrtc==0.5.0
ipywidgets==7.5.1
isort==4.3.21
itsdangerous==1.1.0
jedi==0.17.0
jeepney==0.4.3
jep==3.9.0
Jinja2==2.10.1
jiphy==1.2.2
jmespath==0.9.4
joblib==0.15.1
json5==0.8.5
jsonpatch==1.16
jsonpointer==1.10
jsonschema==3.2.0
jupyter==1.0.0
jupyter-client==6.1.3
jupyter-console==6.0.0
jupyter-core==4.6.3
jupyterlab==1.2.3
jupyterlab-git==0.10.1
jupyterlab-server==1.0.6
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.2
keyring==21.2.1
keyrings.alt==3.0
kfp==0.2.2
kfp-notebook==0.8.2
kfp-server-api==0.1.18.3
kiwisolver==1.2.0
kubernetes==10.0.0
launchpadlib==1.10.6
lazr.restfulclient==0.13.5
lazr.uri==1.0.3
lazy-object-proxy==1.4.3
linecache2==1.0.0
lint==1.2.1
llvmlite==0.32.1
locket==0.2.0
Mako==1.0.7
Markdown==3.2.2
MarkupSafe==1.1.1
matplotlib==3.2.1
maya==0.6.1
mccabe==0.6.1
minio==5.0.10
mistune==0.8.4
modin==0.8.0
more-itertools==8.0.2
msgpack==0.6.2
multidict==4.7.6
murmurhash==1.0.2
nbconvert==5.6.1
nbdime==1.1.0
nbformat==5.0.6
nest-asyncio==1.3.3
netifaces==0.10.4
networkx==2.4
ngrok==0.0.1
nltk==3.5
nodejs==0.1.1
notebook==6.0.3
notify2==0.3
num2words==0.5.10
numba==0.49.1
numpy==1.19.1
numpydoc==0.9.2
oauth==1.0.1
oauthlib==3.1.0
olefile==0.45.1
opencv-python==4.2.0.34
optional-django==0.1.0
optuna==2.0.0
Owlready2==0.24
packaging==20.4
PAM==0.4.2
pandas==1.1.0
pandocfilters==1.4.2
parso==0.7.0
partd==1.1.0
pathspec==0.7.0
pathtools==0.1.2
pbr==3.1.1
pdf2image==1.13.1
pendulum==2.1.0
pexpect==4.8.0
pickleshare==0.7.5
Pillow==6.2.2
pkginfo==1.5.0.1
plac==1.1.3
pluggy==0.13.1
pprint==0.1
preshed==3.0.2
prettytable==0.7.2
progressbar2==3.51.3
prometheus-client==0.8.0
prompt-toolkit==3.0.5
protobuf==3.10.0
psutil==5.7.0
psycopg2==2.8.4
ptyprocess==0.6.0
py==1.9.0
py-spy==0.3.3
py4j==0.10.7
pyahocorasick==1.4.0
pyaml==19.12.0
pyarrow==0.16.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycairo==1.16.2
pycodestyle==2.6.0
pycparser==2.20
pycrypto==2.6.1
pycups==1.9.73
pyflakes==2.2.0
Pygments==2.6.1
pygobject==3.26.1
PyJWT==1.7.1
pylint==2.5.2
PyMedTermino==0.3.3
pymessenger==0.0.7.0
pyOpenSSL==17.5.0
pyparsing==2.4.7
PyPDF2==1.26.0
pyperclip==1.8.0
pyrsistent==0.16.0
pyserial==3.4
pysmbc==1.0.15.6
pyspark==2.4.4
pytesseract==0.3.4
pytest==6.0.1
python-apt==1.6.5+ubuntu0.3
python-crfsuite==0.9.7
python-dateutil==2.8.1
python-debian==0.1.32
python-editor==1.0.4
python-git-package==0.3.5
python-Levenshtein==0.12.0
python-magic==0.4.18
python-utils==2.4.0
pythreejs==2.2.0
pytz==2020.1
pytzdata==2019.3
PyWavelets==1.1.1
pyxattr==0.6.0
pyxdg==0.25
PyYAML==5.3.1
pyzmq==19.0.1
qtconsole==4.7.4
QtPy==1.9.0
ray==0.8.6
readme-renderer==26.0
recurring-ical-events==0.1.16b0
redis==3.4.1
regex==2020.2.20
reportlab==3.4.0
requests==2.23.0
requests-file==1.5.1
requests-oauthlib==1.3.0
requests-toolbelt==0.9.1
requests-unixsocket==0.1.5
rfc3986==1.4.0
rfc3986-validator==0.1.1
roman==2.0.0
rsa==4.0
s3fs==0.2.2
s3transfer==0.3.3
sacremoses==0.0.43
scikit-image==0.17.2
scikit-learn==0.23.1
scipy==1.4.1
scour==0.36
seaborn==0.10.1
SecretStorage==3.1.2
Send2Trash==1.5.0
sentencepiece==0.1.91
service-identity==16.0.0
simplejson==3.13.2
six==1.15.0
sklearn==0.0
sklearn-crfsuite==0.3.6
smmap==3.0.4
smmap2==3.0.1
snaptime==0.2.4
snips-nlu==0.20.2
snips-nlu-en==0.2.3
snips-nlu-parsers==0.4.3
snips-nlu-utils==0.9.1
snowballstemmer==2.0.0
sortedcontainers==2.2.2
soupsieve==2.0.1
spacy==2.2.4
spark-nlp==2.5.5
Sphinx==3.1.0
sphinx-rtd-theme==0.4.3
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==1.0.3
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.4
SQLAlchemy==1.3.19
srsly==1.0.2
ssh-import-id==5.7
stevedore==3.2.0
swifter==1.0.3
systemd-python==234
tabulate==0.8.3
tblib==1.7.0
tensorboard==1.14.0
tensorboard-plugin-wit==1.6.0.post3
tensorflow-estimator==1.14.0
termcolor==1.1.0
terminado==0.8.3
tesseract==0.1.3
testfixtures==6.14.1
testpath==0.4.4
testresources==2.0.0
textrazor==1.4.0
textsearch==0.0.17
texttable==1.6.2
thinc==7.4.0
threadpoolctl==2.1.0
tifffile==2020.7.4
timestring==1.6.4
tldextract==2.2.3
tok==0.1.14
tokenizers==0.8.1rc1
toml==0.10.1
toolz==0.10.0
torch==1.5.1
torchvision==0.6.1
tornado==6.0.4
tox==3.17.1
tqdm==4.46.1
traceback2==1.4.0
traitlets==4.3.3
traittypes==0.2.1
transformers==3.0.2
twilio==6.41.0
twine==3.2.0
Twisted==17.9.0
typed-ast==1.4.1
typing-extensions==3.7.4.2
tzlocal==2.1
ufw==0.36
Unidecode==1.1.1
unit-converter==1.1.0
unittest2==1.1.0
uritemplate==3.0.1
urllib3==1.25.2
utils==1.0.1
vaex==3.0.0
vaex-arrow==0.5.1
vaex-astro==0.7.0
vaex-core==2.0.3
vaex-hdf5==0.6.0
vaex-jupyter==0.5.2
vaex-ml==0.9.0
vaex-server==0.3.1
vaex-viz==0.4.0
virtualenv==16.6.0
wadllib==1.3.2
wasabi==0.6.0
watchdog==0.10.3
wcwidth==0.2.4
webencodings==0.5.1
websocket-client==0.57.0
Werkzeug==1.0.1
Whoosh==2.7.4
widgetsnbextension==3.5.1
wrapt==1.12.1
xarray==0.15.1
yarl==1.4.2
youtube-dl==2018.3.14
zict==2.0.0
zipp==3.1.0
zope.interface==4.3.2

pip freeze:

DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
absl-py==0.8.1
antlr==2.7.5rc1
asn1crypto==0.24.0
astor==0.8.1
astroid==1.6.0
attrs==19.1.0
Automat==0.6.0
backports-abc==0.5
backports.functools-lru-cache==1.4
backports.shutil-get-terminal-size==1.0.0
backports.weakref==1.0.post1
beautifulsoup4==4.6.0
bleach==3.1.0
blis==0.2.4
cachetools==3.1.1
cairocffi==0.8.0
certifi==2019.3.9
cffi==1.11.5
chardet==3.0.4
click==6.7
colorama==0.3.7
configobj==5.0.6
configparser==3.7.4
constantly==15.1.0
coverage==4.5
cryptography==2.1.4
cycler==0.10.0
cymem==2.0.2
decorator==4.4.0
defusedxml==0.6.0
dot2tex==2.9.0
entrypoints==0.3
enum34==1.1.6
funcsigs==1.0.2
functools32==3.2.3.post2
futures==3.2.0
gast==0.2.2
GDAL==2.2.2
Genshi==0.7
google-auth==1.8.2
google-auth-oauthlib==0.4.1
google-pasta==0.1.8
grpcio==1.25.0
h5py==2.10.0
html5lib==0.999999999
hyperlink==17.3.1
idna==2.8
incremental==16.10.1
ipaddress==1.0.17
ipykernel==4.10.0
ipython==5.8.0
ipython-genutils==0.2.0
ipywidgets==7.4.2
isort==4.3.4
Jinja2==2.10.1
jsonschema==3.0.1
jupyter==1.0.0
jupyter-client==5.2.4
jupyter-console==5.2.0
jupyter-core==4.4.0
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.0
keyring==10.6.0
keyrings.alt==3.0
lazy-object-proxy==1.3.1
logilab-common==1.4.1
lxml==4.2.1
Markdown==3.1.1
MarkupSafe==1.1.1
matplotlib==2.1.1
mccabe==0.6.1
mistune==0.8.4
mock==3.0.5
murmurhash==1.0.2
mysqlclient==1.3.10
nbconvert==5.5.0
nbformat==4.4.0
nose==1.3.7
notebook==5.7.8
numpy==1.16.3
oauthlib==3.1.0
olefile==0.45.1
opt-einsum==2.3.2
PAM==0.4.2
pandocfilters==1.4.2
pathlib==1.0.1
pathlib2==2.3.3
pexpect==4.7.0
pickleshare==0.7.5
Pillow==5.1.0
plac==0.9.6
ply==3.11
preshed==2.0.1
prometheus-client==0.6.0
prompt-toolkit==1.0.16
ptyprocess==0.6.0
pyasn1==0.4.2
pyasn1-modules==0.2.1
pycairo==1.16.2
pycparser==2.18
pycrypto==2.6.1
pycurl==7.43.0.1
pyenchant==2.0.0
pyExcelerator==0.6.4.1
pyface==4.5.2
Pygments==2.4.2
pygobject==3.26.1
pylint==1.8.3
PyOpenGL==3.1.0
pyOpenSSL==17.5.0
pyparsing==2.2.0
pyrsistent==0.15.2
pyserial==3.4
python-apt==1.6.5+ubuntu0.3
python-dateutil==2.8.0
python-magic==0.4.16
pytz==2018.3
pyxdg==0.25
pyzmq==18.0.1
qtconsole==4.5.1
reportlab==3.4.0
requests==2.22.0
requests-oauthlib==1.3.0
rpm==4.14.1
rpy2==2.8.6
rsa==4.0
scandir==1.10.0
scipy==0.19.1
scour==0.36
SecretStorage==2.3.1
Send2Trash==1.5.0
service-identity==16.0.0
simplegeneric==0.8.1
singledispatch==3.4.0.3
six==1.12.0
srsly==0.0.5
subprocess32==3.2.7
tensorboard==2.0.2
tensorflow-estimator==2.0.1
termcolor==1.1.0
terminado==0.8.2
testpath==0.4.2
thinc==7.0.4
tornado==5.1.1
tqdm==4.32.1
traitlets==4.3.2
traits==4.6.0
traitsui==4.5.1
Twisted==17.9.0
urllib3==1.25.2
wasabi==0.2.2
wcwidth==0.1.7
webencodings==0.5.1
Werkzeug==0.16.0
widgetsnbextension==3.4.2
wrapt==1.11.2
wxPython==3.0.2.0
wxPython-common==3.0.2.0
xcffib==0.5.1
zope.interface==4.3.2
tobiasblasberg commented 3 years ago

Hi,

have you tried pip3 install -Iv tensorflow==2.2.0 ? After this pip3 freeze should list tensorflow 2.2.0. If not, please share the output. Maybe a clean conda or docker environment would be the easier choice since I expect that some packages do not work together with TF 2.2.0 which is why previous installs might have failed...

Best, Tobias

stevesolun commented 3 years ago

@tobiasblasberg Still without luck (I could install it on Windows 10 with a lot of other packages but not on Ubuntu 18.04).

Here is the output (TLDR :) )

https://justpaste.it/1u1ms

stevesolun commented 3 years ago

My Python version is 3.7.5 if it can help.

tobiasblasberg commented 3 years ago

I am running it as well on Ubuntu 18.04 with python 3.7.8.

Only think that I would try is updating python and creating an empty conda environment with first installing TF with all dependencies by running pip3 install tensorflow==2.2.0.

Not sure what else could cause installation issue of TF...