I'm trying to install a python software (https://github.com/GuLinux/AstroPhoto-Plus) but in logs, i've got this error during execution just after installation:
Exception: Version mismatch: this is the 'cffi' package version 1.14.6, located in '/tmp/pip-build-env-kuxyuc2x/overlay/lib/python3.8/site-packages/cffi/api.py'.
When we import the top-level '_cffi_backend' extension module, we get version 1.14.0, located in '/usr/lib/python3/dist-packages/_cffi_backend.cpython-38-arm-linux-gnueabihf.so'. The two versions should be equal; check your installation.
As i understand i've got :
hamham#astroloutre:~/www$ pip show cffi
Name: cffi
Version: 1.14.0
Summary: Foreign Function Interface for Python calling C code.
Home-page: http://cffi.readthedocs.org
Author: Armin Rigo, Maciej Fijalkowski
Author-email: python-cffi#googlegroups.com
License: MIT
Location: /home/hamham/.local/lib/python3.8/site-packages
Requires: pycparser
Required-by:
I'm trying install 1.14.6 version
hamham#astroloutre:~/www$ pip install --upgrade cffi==1.14.6
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Processing /home/hamham/.cache/pip/wheels/21/a9/81/c074a48686fe8c1ffada1f9e5f53b553c0f766503c0b991c23/cffi-1.14.6-cp38-cp38-linux_armv7l.whl
Requirement already satisfied, skipping upgrade: pycparser in /home/hamham/.local/lib/python3.8/site-packages (from cffi==1.14.6) (2.20)
Installing collected packages: cffi
Attempting uninstall: cffi
Found existing installation: cffi 1.14.0
Uninstalling cffi-1.14.0:
Successfully uninstalled cffi-1.14.0
Successfully installed cffi-1.14.6
hamham#astroloutre:~/www$ pip show cffi
Name: cffi
Version: 1.14.6
Summary: Foreign Function Interface for Python calling C code.
Home-page: http://cffi.readthedocs.org
Author: Armin Rigo, Maciej Fijalkowski
Author-email: python-cffi#googlegroups.com
License: MIT
Location: /home/hamham/.local/lib/python3.8/site-packages
Requires: pycparser
Required-by:
Reinstallation and same error :
Exception: Version mismatch: this is the 'cffi' package version 1.14.6, located in '/tmp/pip-build-env-34pknb8l/overlay/lib/python3.8/site-packages/cffi/api.py'. When we import the top-level '_cffi_backend' extension module, we get version 1.14.0, located in '/usr/lib/python3/dist-packages/_cffi_backend.cpython-38-arm-linux-gnueabihf.so'. The two versions should be equal; check your installation.
I'm not python developper and despite an issue i've posted in github, i've no answer (it seems repository is abandoned sinde one year), i don't know what i can do.
Thanks.
Resolved with installing package "python3-cffi"
sudo apt install python3-cffi
and downgrade pip package :
pip install --upgrade cffi==1.14.0
Related
I tried to run Pennylane on Colab, so I install it first. But the "Installed devices" are null, what's going on? I have restart and rebuilt for several times. Here is my code.
!pip install pennylane pennylane-qiskit
import pennylane as qml
qml.about()
Here is the result (with nothing in "Installed devices"):
Successfully built qiskit python-constraint contextvars yfinance docplex dlx
Installing collected packages: semantic-version, appdirs, pennylane, sympy, fastjsonschema, retworkx, python-constraint, ply, immutables, contextvars, qiskit-terra, pybind11, qiskit-aer, websockets, cryptography, ntlm-auth, requests-ntlm, qiskit-ibmq-provider, qiskit-ignis, inflection, quandl, lxml, yfinance, docplex, dlx, qiskit-aqua, qiskit, pennylane-qiskit
Found existing installation: sympy 1.1.1
Uninstalling sympy-1.1.1:
Successfully uninstalled sympy-1.1.1
Found existing installation: lxml 4.2.6
Uninstalling lxml-4.2.6:
Successfully uninstalled lxml-4.2.6
Successfully installed appdirs-1.4.4 contextvars-2.4 cryptography-3.2.1 dlx-1.0.4 docplex-2.15.194 fastjsonschema-2.14.5 immutables-0.14 inflection-0.5.1 lxml-4.6.1 ntlm-auth-1.5.0 pennylane-0.12.0 pennylane-qiskit-0.12.0 ply-3.11 pybind11-2.6.0 python-constraint-1.4.0 qiskit-0.23.0 qiskit-aer-0.7.0 qiskit-aqua-0.8.0 qiskit-ibmq-provider-0.11.0 qiskit-ignis-0.5.0 qiskit-terra-0.16.0 quandl-3.5.3 requests-ntlm-1.1.0 retworkx-0.5.0 semantic-version-2.6.0 sympy-1.6.2 websockets-8.1 yfinance-0.1.55
Name: PennyLane
Version: 0.12.0
Summary: PennyLane is a Python quantum machine learning library by Xanadu Inc.
Home-page: https://github.com/XanaduAI/pennylane
Author: None
Author-email: None
License: Apache License 2.0
Location: /usr/local/lib/python3.6/dist-packages
Requires: semantic-version, scipy, autograd, networkx, numpy, appdirs, toml
Required-by: PennyLane-qiskit
Platform info: Linux-4.19.112+-x86_64-with-Ubuntu-18.04-bionic
Python version: 3.6.9
Numpy version: 1.18.5
Scipy version: 1.4.1
Installed devices:
When I tried to use device, I got
raise DeviceError("Device does not exist. Make sure the required plugin is installed.")
Try upgrading the pennylane-sf library as mentioned here:
!pip install pennylane-sf --upgrade
Restart the runtime and that's it!
https://discuss.pennylane.ai/t/tutorial-for-gaussian-boson-sampling-sample-code/728
Had been answered here:
https://discuss.pennylane.ai/t/error-when-calling-device/259/35
See the url for detail.
I am trying to solve a problem of pandas when I run python3.7 code on databricks.
The error is:
ImportError: cannot import name 'roperator' from 'pandas.core.ops' (/databricks/python/lib/python3.7/site-packages/pandas/core/ops.py)
the pandas version:
pd.__version__
0.24.2
I run
from pandas.core.ops import roperator
well on my laptop with
pandas 0.25.1
So, I tried to upgrade pandas on databricks.
%sh pip uninstall -y pandas
Successfully uninstalled pandas-1.1.2
%sh pip install pandas==0.25.1
Collecting pandas==0.25.1
Downloading pandas-0.25.1-cp37-cp37m-manylinux1_x86_64.whl (10.4 MB)
Requirement already satisfied: python-dateutil>=2.6.1 in /databricks/conda/envs/databricks-ml/lib/python3.7/site-packages (from pandas==0.25.1) (2.8.0)
Requirement already satisfied: numpy>=1.13.3 in /databricks/conda/envs/databricks-ml/lib/python3.7/site-packages (from pandas==0.25.1) (1.16.2)
Requirement already satisfied: pytz>=2017.2 in /databricks/conda/envs/databricks-ml/lib/python3.7/site-packages (from pandas==0.25.1) (2018.9)
Requirement already satisfied: six>=1.5 in /databricks/conda/envs/databricks-ml/lib/python3.7/site-packages (from python-dateutil>=2.6.1->pandas==0.25.1) (1.12.0)
Installing collected packages: pandas
ERROR: After October 2020 you may experience errors when installing or updating packages.
This is because pip will change the way that it resolves dependency conflicts.
We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.
mlflow 1.8.0 requires alembic, which is not installed.
mlflow 1.8.0 requires prometheus-flask-exporter, which is not installed.
mlflow 1.8.0 requires sqlalchemy<=1.3.13, which is not installed.
sklearn-pandas 2.0.1 requires numpy>=1.18.1, but you'll have numpy 1.16.2 which is incompatible.
sklearn-pandas 2.0.1 requires pandas>=1.0.5, but you'll have pandas 0.25.1 which is incompatible.
sklearn-pandas 2.0.1 requires scikit-learn>=0.23.0, but you'll have scikit-learn 0.20.3 which is incompatible.
sklearn-pandas 2.0.1 requires scipy>=1.4.1, but you'll have scipy 1.2.1 which is incompatible.
Successfully installed pandas-0.25.1
When I run:
import pandas as pd
pd.__version__
it is still:
0.24.2
Did I missed something ?
thanks
It's really recommended to install libraries via cluster initialization script. The %sh command is executed only on the driver node, but not on the executor nodes. And it also doesn't affect Python instance that is already running.
The correct solution will be to use dbutils.library commands, like this:
dbutils.library.installPyPI("pandas", "1.0.1")
dbutils.library.restartPython()
this will install library to all places, but it will require restarting of the Python to pickup new libraries.
Also, although it's possible to specify only package name, it's recommended to specify version explicitly, as some of the library version may not be compatible with runtime. Also, consider usage of the newer runtimes where library versions are already updated - check the release notes for runtimes to figure out the library versions installed out of the box.
For newer Databricks runtimes you can use new magic commands: %pip and %conda to install dependencies. See the documentation for more details.
I am trying to pip install rasa on Ubuntu x64 in a new Python 3.6.9 virtual environment.
Collecting tensorflow-cpu~=1.15.0 (from rasa)
Cache entry deserialization failed, entry ignored
Could not find a version that satisfies the requirement tensorflow-cpu~=1.15.0 (from rasa) (from versions: )
No matching distribution found for tensorflow-cpu~=1.15.0 (from rasa)
If I pip install tensorflow-cpu~=1.15.0 I get the same error. I also cannot pip install tensorflow-cpu.
According to this answer I can list available package versions. It uses this snippet
def versions(pkg_name):
url = f'https://pypi.python.org/pypi/{pkg_name}/json'
releases = json.loads(request.urlopen(url).read())['releases']
return sorted(releases, key=parse_version, reverse=True)
Running it with pkg_name="tensorflow-cpu" I get
2.1.0
2.1.0rc2
2.1.0rc1
2.1.0rc0
1.15.0
1.15.0rc3
1.15.0rc2
1.15.0rc1
1.15.0rc0
But 1.15.0 is in this list. So why can't pip install it?
I am trying to install snmpresponder using the pip (in windows). I am using python 2.7. I found the snmpresponder from the following website. http://snmplabs.com/snmpresponder/
This is what I tried
pip install snmpresponder
But I am getting the following error.
Collecting snmpresponder
Using cached https://files.pythonhosted.org/packages/ba/47/5fee2bffe4b63f750d9f55118fce1796610eb2bf90b8526f584b05d56cb8/snmpresponder-0.0.2-py2.py3-none-any.whl
ERROR: Could not find a version that satisfies the requirement pysnmp>=5.0.0 (from snmpresponder) (from versions: 4.1.16d, 4.1.12a0, 4.1.13a0, 4.1.15a0, 4.1.16a0, 4.1.16b0, 4.1.16rc0, 4.2.1, 4.2.2, 4.2.3, 4.2.4, 4.2.5, 4.3.0, 4.3.1, 4.3.2, 4.3.3, 4.3.4, 4.3.5, 4.3.6, 4.3.7, 4.3.8, 4.3.9, 4.3.10, 4.4.1, 4.4.2, 4.4.3, 4.4.4, 4.4.5, 4.4.6, 4.4.7, 4.4.8, 4.4.9, 4.4.10, 4.4.11, 4.4.12)
ERROR: No matching distribution found for pysnmp>=5.0.0 (from snmpresponder)
and I checked my version it is showing 4.4.12 (using pip show pysnmp)
Name: pysnmp
Version: 4.4.12
Summary: SNMP library for Python
Home-page: https://github.com/etingof/pysnmp
Author: Ilya Etingof
Author-email: etingof#gmail.com
License: BSD
Location: c:\python27\lib\site-packages
Requires: pycryptodomex, pysmi, pyasn1
I also tried for the update also, still, it is showing version less than 5.0.0? So what should I do for installing the snmpresponder? Should I change pysnmp or download it using some other way. Please ask If you need more details. My basic need is to fix some error I am facing in the SNMP agent side.
SNMP responder tool is still in a work-in-progress state. Better pull snmpresponder from GitHub, it depends on GitHub version of pysnmp so the dependencies would be satisfied right away.
I have tried to install tensorflow-data-validation 0.9.0 with pip installation, but it keeps giving me the same error: Could not find a version that satisfies the requirement tensorflow-data-validation...
isn't this version available for windows or i am just missing something?
From the PyPi documentation on tensorflow-data-validation you can see the version compatibility:
Requires: Python >=2.7,<3
So you won't be able to install it with other versions (like your 3.6.2).