How_to_solve_python_version_problem_networkx? - version-control

Type:
if you having problem with networkx library in python, you should follow the below step by step :
1-)python --version
2-)if the version is 3.7, you need to downgrade version
3-)conda install python=3.6

Related

Upgrade Apache Superset 1.4.1 to the latest (2.0?)

how to upgrade Apache Superset 1.4.1 to the latest (2.0),i want to use the version 2.0.how to migrate database,update database etc?
You need to run the following to upgrade
pip install apache-superset --upgrade
However, you may face some dependency problems,as mentioned in this issue. This is about the wrong dependencies being fetched.
To sort it out, use the following (from the issue itself)
pip install Werkzeug==2.0.3
pip install flask==2.0.3
pip install jinja2==3.0.1
Then run the superset database upgrade
superset db upgrade

Installing ipython with python 3.5 using pip?

The Jupyter docs recommend using conda to install jupyter, if the runtime python is version 3.5 or lower. Installation is pretty straightforward with conda.
Follow Anaconda’s instructions for downloading and installing the Python 3.5 version.
$ conda install jupyter
$ pip list | grep ipython
ipython 7.29.0
ipython-genutils 0.2.0
$ ipython notebook --ip=0.0.0.0
This question is to discover if it's possible to install a 3.5 compatible jupyter using only pip, and without conda.
Given the following environment:
$ python --version
Python 3.5.2
$ sudo apt-get install python3-pip
$ pip3 --version
pip 8.1.1 from /usr/lib/python3/dist-packages (python 3.5)
Installing ipython is possible with the following restrictions:
$ python3 -m pip install ipython==7.9 traitlets==4.3.3 jedi==0.17.2
Jupyter, however, doesn't install gracefully.
The following allows for installation:
pip3 install jupyter ipython==7.9 traitlets==4.3.3 jedi==0.17.2 pyzmq==20 argon2-cffi==21.1.0
But at runtime, jupyter crashes:
File "/home/vagrant/.local/lib/python3.5/site-packages/ipython_genutils/importstring.py", line 31, in import_item
module = __import__(package, fromlist=[obj])
File "/home/vagrant/.local/lib/python3.5/site-packages/notebook/__init__.py", line 27, in <module>
from .nbextensions import install_nbextension
File "/home/vagrant/.local/lib/python3.5/site-packages/notebook/nbextensions.py", line 15, in <module>
from jupyter_core.paths import (
File "/home/vagrant/.local/lib/python3.5/site-packages/jupyter_core/__init__.py", line 1, in <module>
from .version import version_info, __version__
File "/home/vagrant/.local/lib/python3.5/site-packages/jupyter_core/version.py", line 21
_suffix_ = f'.dev{version_info.serial}'
Is it possible to install a 3.5 friendly jupyter using pip?
Resources
pyzmq https://github.com/jupyter/notebook/issues/5961
iPython Versions
https://github.com/ipython/ipython/blob/master/README.rst
IPython 7.10+ supports Python 3.6 and above.
When using Python 2.7, please install IPython 5.x LTS Long Term Support version.
Python 3.3 and 3.4 were supported up to IPython 6.x.
Python 3.5 was supported with IPython 7.0 to 7.9.
traitlets vs. python 3.5
Traitlets 5 uses f-strings in code, not compatible with Python 3.5
uninstall the traitlets 5.0.3 version, and install 4.3.3 version
https://githubmemory.com/repo/ipython/traitlets/issues/620
argon2-cffi vs. python 3.5
https://packagegalaxy.com/python/argon2-cffi
It targets Python 3.6 and newer, and PyPy3.
The last version that works with Python 2.7 is 20.1.0, and the last version that works with Python 3.5 is 21.1.0.
jedi vs. python 3.5
https://jedi.readthedocs.io/en/latest/docs/changelog.html
0.17.2 (2020-07-17)
This will be the last release that supports Python 2 and Python 3.5. 0.18.0 will be Python 3.6+.

Upgrade from networkx 2.4 to networkx 2.2

I would like to upgrade from "networkx 2.4" to "networkx 2.2". How to do this using python's pip command? Thank you
You can force a specific version with the == operator. pip should automatically uninstall the current version you have installed and install the older version:
pip install networkx==2.2

Is there a way to install pykml with conda and python 3.7?

If I try to install pykml with conda I got the following conflict:
Specifications:
pykml -> python[version='2.7.|3.4.|3.5.|3.6.|<3']
Your python: python=3.7
My question is now if there exist a way to install pykml in python3.7 and to avoid downgrading my version of python?
regards

pip install tesserocr hangs during setup.py

Ubuntu installation gets stuck very early on. Current list of packages and confirmation that Tesseract and Leptonica seems to be installed correctly. Any clues appreciated?
(venv) ubuntu#ip$ pip install tesserocr
Collecting tesserocr
Using cached
https://files.pythonhosted.org/packages/f8/6d/4e81e041f33a4419e59edcb1dbdf3c
56e9393f60f5ef531381bd67a1339b/tesserocr-2.3.1.tar.gz
Installing collected packages: tesserocr
Running setup.py install for tesserocr ... \
Package Version
--------------- -------
click 6.7
Cython 0.28.5
dominate 2.3.1
Flask 1.0.2
Flask-Bootstrap 3.3.7.1
Flask-Login 0.4.1
Flask-WTF 0.14.2
ghostscript 0.6
gunicorn 19.9.0
itsdangerous 0.24
Jinja2 2.10
MarkupSafe 1.0
Pillow 5.2.0
pip 18.0
pkg-resources 0.0.0
setuptools 20.7.0
visitor 0.1.3
Werkzeug 0.14.1
WTForms 2.2.1
(venv) ubuntu#ip-172-26-9-100:~/apa$ tesseract -v
tesseract 3.04.01
leptonica-1.73
libgif 5.1.2 : libjpeg 8d (libjpeg-turbo 1.4.2) : libpng 1.2.54 : libtiff 4.0.6 : zlib 1.
2.8 : libwebp 0.4.4 : libopenjp2 2.1.0
Problem resolved after rebooting the machine. Not sure why this worked, other than I'd installed a lot of packages to get to this stage, and maybe something required a restart to complete the installation? If anyone can explain the problem, I'd be interested to understand why that might be?