weasyprint - installation in ubuntu. - python

I was trying to install weasyprint using command "pip install weasyprint".
It gave me error:
requests 2.18.4 has requirement chardet<3.1.0,>=3.0.2, but you'll have
chardet 2.3.0 which is incompatible.
tensorboard 1.8.0 has requirement html5lib==0.9999999, but you'll have
html5lib 1.0.1 which is incompatible.
bleach 1.5.0 has requirement html5lib!=0.9999,!=0.99999,
<0.99999999,>=0.999, but you'll have html5lib 1.0.1 which is
incompatible.
Does anyone know how to fix it?

Related

Flask User Login email-validator

I am using flask to create user login and I encounter this error when I try to run my program. As you can see I already have email-validtaor installed, so why is it still telling me to install it?
Exception: Install 'email_validator' for email validation support.
This is my pip list that show email-validator installed.
Peters-Air:~ peterkogolo$ pip list
Package Version
backports.entry-points-selectable 1.1.0
bcrypt 3.2.0
blinker 1.4
certifi 2021.10.8
cffi 1.15.0
click 8.0.3
distlib 0.3.3
dnspython 2.2.1
email-validator 1.2.1
filelock 3.3.1
Flask 2.0.2
Flask-Bcrypt 1.0.1
Flask-Login 0.5.0
Flask-Mail 0.9.1
Flask-SQLAlchemy 2.5.1
greenlet 1.1.2
idna 3.3
itsdangerous 2.0.1
Jinja2 3.0.2
MarkupSafe 2.0.1
pip 21.3.1
pipenv 2021.5.29
platformdirs 2.4.0
pycparser 2.21
setuptools 57.4.0
six 1.16.0
SQLAlchemy 1.4.26
virtualenv 20.9.0
virtualenv-clone 0.5.7
Werkzeug 2.0.2
WTForms 3.0.0

Tensorflow download

when I try to download Tensorflow, I get these errors. Can you help me please?
ERROR: astroid 2.2.5 requires typed-ast>=1.3.0; implementation_name == "cpython", which is not installed.
ERROR: tf-models-official 2.6.0 has requirement tensorflow>=2.5.0, but you'll have tensorflow 2.4.1 which is incompatible.
ERROR: tensorflow-text 2.6.0 has requirement tensorflow<2.7,>=2.6.0, but you'll have tensorflow 2.4.1 which is incompatible.
ERROR: lvis 0.5.3 has requirement matplotlib>=3.1.1, but you'll have matplotlib 3.1.0 which is incompatible.
ERROR: apache-beam 2.32.0 has requirement avro-python3!=1.9.2,<1.10.0,>=1.8.1, but you'll have avro-python3 1.10.2 which is incompatible.

Error installing tensorflow-io kaggle notebook

I'm trying to install tensorflow-io to work with flac audio files
For that I use this command pip install -q tensorflow-io
But I got this Error:
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.
kubernetes 10.1.0 requires pyyaml~=3.12, but you have pyyaml 5.3.1 which is incompatible.
jupyterlab-git 0.10.0 requires nbdime<2.0.0,>=1.1.0, but you have nbdime 2.0.0 which is incompatible.
google-cloud-pubsub 1.4.3 requires google-api-core[grpc]<1.17.0,>=1.14.0, but you have google-api-core 1.23.0 which is incompatible.
earthengine-api 0.1.244 requires google-api-python-client>=1.12.1, but you have google-api-python-client 1.8.0 which is incompatible.
bokeh 2.2.3 requires tornado>=5.1, but you have tornado 5.0.2 which is incompatible.
astroid 2.3.3 requires wrapt==1.11.*, but you have wrapt 1.12.1 which is incompatible.
aiobotocore 1.1.2 requires botocore<1.17.45,>=1.17.44, but you have botocore 1.19.31 which is incompatible.
How to install tensorflow-io on kaggle notebook
I think it's only a warning. I got the same somedays back when I did
!pip install tensorflow-io
It got installed successfully and I was able to train also.

Error 'html5lib not found' when using pandas.read_html() function in conda env

Current code:
import requests
import pandas as pd
url = 'https://docs.anaconda.com/anaconda/user-guide/getting-started/'
html = requests.get(url, verify=False).content
df_list = pd.read_html(html, flavor='bs4')
df = df_list[0]
I'm tying to extract html from a page using pandas.read_html() function while setting the 'flavor' arg = 'bs4' or 'html5lib'. I get the error: ImportError: html5lib not found, please install it.
C:\Users\...\Miniconda3\lib\site-packages\urllib3\connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made to host 'docs.anaconda.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning,
Traceback (most recent call last):
File "C:\Users\...\Documents\...\data_scrape.py", line 11, in <module>
df_list = pd.read_html(html, flavor='bs4')
File "C:\Users\...\Miniconda3\lib\site-packages\pandas\io\html.py", line 1100, in read_html
displayed_only=displayed_only,
File "C:\Users\...\Miniconda3\lib\site-packages\pandas\io\html.py", line 891, in _parse
parser = _parser_dispatch(flav)
File "C:\Users\...\Miniconda3\lib\site-packages\pandas\io\html.py", line 840, in _parser_dispatch
raise ImportError("html5lib not found, please install it")
ImportError: html5lib not found, please install it
But I certainly have bs4 and html5lib installed in the env. After running the conda list command:
conda list
# packages in environment at C:\Users\...\Miniconda3\envs\web_scrape:
#
# Name Version Build Channel
beautifulsoup4 4.9.1 py38h32f6830_0 conda-forge
bs4 4.9.1 0 conda-forge
ca-certificates 2020.6.20 hecda079_0 conda-forge
certifi 2020.6.20 py38h32f6830_0 conda-forge
html5lib 1.1 pyh9f0ad1d_0 conda-forge
intel-openmp 2020.1 216
libblas 3.8.0 16_mkl conda-forge
libcblas 3.8.0 16_mkl conda-forge
libiconv 1.15 vc14h29686d3_5 [vc14] anaconda
liblapack 3.8.0 16_mkl conda-forge
libxml2 2.9.10 h464c3ec_1 anaconda
libxslt 1.1.34 he774522_0 anaconda
lxml 4.5.2 py38he3d0fc9_0 conda-forge
mkl 2020.1 216
numpy 1.18.5 py38h72c728b_0 conda-forge
openssl 1.1.1g he774522_0 conda-forge
pandas 1.0.5 py38he6e81aa_0 conda-forge
pip 20.1.1 py_1 conda-forge
python 3.8.3 cpython_h5fd99cc_0 conda-forge
python-dateutil 2.8.1 py_0 conda-forge
python_abi 3.8 1_cp38 conda-forge
pytz 2020.1 pyh9f0ad1d_0 conda-forge
setuptools 49.2.0 py38h32f6830_0 conda-forge
six 1.15.0 pyh9f0ad1d_0 conda-forge
soupsieve 2.0.1 py38h32f6830_0 conda-forge
sqlite 3.32.3 he774522_1 conda-forge
vc 14.1 h869be7e_1 conda-forge
vs2015_runtime 14.16.27012 h30e32a0_2 conda-forge
webencodings 0.5.1 py_1 conda-forge
wheel 0.34.2 py_1 conda-forge
wincertstore 0.2 py38_1003 conda-forge
I don't know why the packages aren't being recognized by the pandas function. There are multiple other posts that deal with the same problem, but none of the solutions have worked for me.
Example, a few posts like these:
Python: ImportError: lxml not found, please install it
and
The above answers suggest to use pip3 to install the packages. When I run those commands I get the following info.
pip3 install html5lib
Requirement already satisfied: html5lib in c:\users\...\miniconda3\envs\web_scrape\lib\site-packages (1.1)
Requirement already satisfied: six>=1.9 in c:\users\...\miniconda3\envs\web_scrape\lib\site-packages (from html5lib) (1.15.0)
Requirement already satisfied: webencodings in c:\users\...\miniconda3\envs\web_scrape\lib\site-packages (from html5lib) (0.5.1)
Any help or references to a similar problem are appreciated!
Thank you!
Try
conda install -c anaconda html5lib
I had the same issue and I have no idea why it worked but it worked just fine for me, I had the same trouble with the lib lxml and I applied the same solution. I just copied the answer from a post on Github
https://github.com/jupyter/notebook/issues/3623

Can I still use virtualenv after installing Anaconda?

I used to use virtualenv to create different project environments, same library (different versions). Recently, I installed Anaconda to do some Machine Learning. When I try to create a new environment using virtualenv I get this error:
(venv) usr#KC-SCE:~/Desktop/bTree$ pip install nltk
Requirement already satisfied: nltk in /home/usr/anaconda3/lib/python3.6/site-packages (3.3)
Requirement already satisfied: six in /home/usr/anaconda3/lib/python3.6/site-packages (from nltk) (1.11.0)
tensorflow-tensorboard 1.5.1 has requirement bleach==1.5.0, but you'll have bleach 2.1.3 which is incompatible.
tensorflow-tensorboard 1.5.1 has requirement html5lib==0.9999999, but you'll have html5lib 1.0.1 which is incompatible.
tensorboard 1.8.0 has requirement bleach==1.5.0, but you'll have bleach 2.1.3 which is incompatible.
tensorboard 1.8.0 has requirement html5lib==0.9999999, but you'll have html5lib 1.0.1 which is incompatible.
jupyterlab 0.32.1 has requirement jupyterlab_launcher<0.11.0,>=0.10.0, but you'll have jupyterlab-launcher 0.11.0 which is incompatible.
What I do not understand is that why I am not able to download a library that already exists! I may need it in another version or else.

Categories