Checking version of cv2 in python 3.7 - python-3.7

I have recently just installed cv2 for python 3.7 on a Mac os (Mojave). I have no problems importing it, but when I try to check the version with
cv2._version_
but I get
AttributeError: module 'cv2' has no attribute '_version'
can anyone help? thanks!

version needs to have double underscores (_)
To check version via python (installed through pip)
import cv2
print(cv2.__version__)
To check version for homebrew installs:
brew info opencv
or
brew info opencv3
(depending on how you installed it)

Related

OSError: /lib64/libm.so.6: version `GLIBC_2.27' not found

I installed opensmile package using pip. Installation does not give any issue.
But when I import opensmile, it gives
OSError: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /personal/su/lib/python3.6/site-packages/opensmile/core/bin/linux/libSMILEapi.so)
May I know how can I solve the issue?
List the current versions installed nvm ls
If version 16 is no installed nvm install 16
Change version 16 nvm use v16.x.x
Verify version nvm version

LLVM downloads 11 to environment

Best regards
i need to download librosa to raspberry pi so first of all i downloaded virtualenv and created environment and installed llvm with:
sudo apt-get install llvm
pip3 install llvmlite==0.37
pip3 install librosa=0.6.3
then tried to import a librosa in abc.py file. execution output is:
importerror-numpy-core-multiarray-failed-to-import
changing the numpy version didin't help output evolved:
numba 0.55 requires numpy 1.22
tried to change numba version but it didin't help either
anyway...
everyone installed llvm version 7 for librosa but my version is 11. I couldn't find the download with version. I've tried:
sudo apt-get install llvm-7.0
Librosa and numpy does not work well in llvm11.
how can i download version 7?
Thanks for advices

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

Error: No module named 'PyQt5.sip' - When installing eric6-19.03

I have noticed a number of similar questions on stackoverflow, but none that really helped me with my current challenge. I have been attempting to install eric6 on my Raspberry Pi setup. And then I encountered the following messages:
Checking dependencies
Python Version: 3.6.8
PyQt5 could not be detected.
Error: No module named 'PyQt5.sip'
Shall 'PyQt5' be installed using pip? (Y/n) Y
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: PyQt5 in /usr/local/lib/python3.6/site-packages (5.12)
Sorry, please install PyQt5.
Error: No module named 'PyQt5.sip'
And when I attempt to use the pip list to look at what has been installed (as I previously already managed to make and install the PyQt5 from source code):
Package Version
---------- -------
pip 19.0.3
PyQt5 5.12
setuptools 40.6.2
sip 4.19.14
So, how do I overcome the issue that I am currently facing? By the way, I am using the following command when attempting to install eric6:
python3 install.py
Thought you might need to know that if it helps.
Python 3.6 isn't available in any Raspbian distribution, so I assume you installed this yourself. You can't install an out-of-distribution Python version and expect distribution Python packages to work. You have PyQt5 installed, yes, but it's the version of PyQt built for Python 3.5 (I'm assuming you're on Raspbian Stretch).
Sometimes you can install Python libraries with pip, and in theory that could work to install the correct version of PyQt for your version of Python, but PyQt only provides wheels for x86 on PyPI, not for Arm, so PyQt is not pip installable on the Pi. The only way to get PyQt on Raspberry Pi is via apt, where your choices are Jessie (old stable - with Python 3.4), Stretch (current stable - with Python 3.5), and Buster (unstable/testing - with Python 3.7). If there's a need for Python >3.5, your best bet is to try upgrading to Buster, but bear in mind it's not ready for release yet.

Install numpy to use within plpython3u in postgres 9.6 for Windows 2012 (64 bit)

I am trying to install numpy to use within plpython3u in postgres 9.6 for
Windows 2012 (64 bit) but I run into dependency problems.
1) I have installed Postgres 9.6 from EnterpriseDB and the language pack,
which automatically installs Python 3.3. <- is there a way to install a newer version of Python?
I have done CREATE EXTENSION plpython3u; and it works correctly.
I tried to install python modules with: pip3.exe install numpy and
python -m pip install --user numpy but numpy-1.12.1 returns an error:
raise RuntimeError("Python version 2.7 or >= 3.4 required.")
If I try to install an older version of numpy==1.10.4, there are a number
of errors about blas and atlas and fortran compilers not being available -
so I didn't pursue that avenue much further.
2) If I install Python 3.6 separately, when CREATing EXTENSION plpython3u,
I get the
ERROR: could not load library "C:/Program
Files/PostgreSQL/9.6/lib/plpython3.dll": The specified module could
not be found.
The DLL is in that location, but the utility "depends" shows that it is
compiled for python33 and not python36, and those dependencies are
missing. Could I replace the plpython3.dll file somehow to get it to work
with Python 3.6?
Surely someone has installed numpy for plpython3u in postgres for Windows,
but I could not find any solutions so far..
Thanks
Peter