virt-manager - ImportError: No module named ordered_dict - python-3.x

I have KVM server, it has python2.7 version. Now along with python2.7, python3 have been installed. Now if I try to do virt-manager I am getting the following error:
from .packages.urllib3.packages.ordered_dict import ordered_dict
ImportError: No module named ordered_dict
If I remove python3, will it effect any other 2.7 packages/libraries ? .

You need to install urllib3==1.22, later versions not working with requests.

In my case, Ubuntu Xenial, with
sudo pip uninstall urllib3
virt-manager worked again

Please follow below steps to resolve the issue.
sudo pip uninstall requests
sudo pip uninstall urllib3
sudo pip install requests

Related

Unable to find dmtx shared library

I installed pylibdmtx. When I try to import this I get an error:
from pylibdmtx import pylibdmtx
ImportError: Unable to find dmtx shared library
I am using python 3.8.8 on mac.
try re-installing both, via pip and using apt-get, if this not works, the error is probably that Python wrapper can`t load libdmtx.
pip3 install pylibdmtx
sudo apt-get install libdmtx0a
I installed it this way:
brew install libdmtx
problem solved!

How to install requests in python 3.7 on Mac

I have trying to install requests in python 3.7 on Mac. I already have python 2.7 installed.
I have read all the previous questions related to this and none of them could solve the issue.
pip3.7 install requests
bash: pip3.7: command not found
python3.7 -m pip install requests
/usr/local/bin/python3.7: No module named pip
I am not able to understand the issue here.
There’s no “pip3.7”, just “pip3”. Try this:
pip3 install requests
Upgrading python3 via brew fixed this issue for me.
brew upgrade python3
And then:
pip3 install requests

How to install tensorflow 1.15.0 in Ubuntu server 18.04

I am using Azure to create an Ubuntu server 18.04. The python3 default version in this VM is 3.6.9. I tried to install python3-pip, then install Tensorflow version 1.15.0 by command: sudo pip3 install Tensorflow==1.15.0.
However I got this error: No matching distribution found for tensorflow==1.15.0
I really don't know how to fix it. On my Windows PC, I got the same error while using python3.7, then I change to use python3.6.5 and everythings is fine. So that I think maybe I should try to install python 3.6.5 on Ubuntu VM. But again, this time, I can't install correctly python 3.6.5 on my Ubuntu server.
Can you please help me to fix it. I am just a newbie and honestly, I am not really good with Ubuntu.
Thank you so much.
I had the same issue.
A simple upgrade of pip to the latest version by:
sudo -H pip3 install --upgrade pip
sudo -H pip2 install --upgrade pip
solved the problem for me. Checkout https://askubuntu.com/questions/712339/how-to-upgrade-pip-to-latest for details how to upgrade pip.
After checking it seems the pip3 version shipped with Ubuntu defaults to pip 9.0.1. However, this version seems to supports only up to Tensorflow 1.14.
I would also strongly suggest to use virtual environments like Anaconda in order not to mess up your system python.
E.g.: https://docs.anaconda.com/anaconda/install/linux/
These are the list of files for TensorFlow 1.15
This command would work:
pip3 install tensorflow==1.15.0
I do see the manylinux wheel file for Ubuntu.
What CPU model and pip version are you using?
Debugging:
pip3 -v install tensorflow==1.15.0 | grep Found | more
Can help you see which platform and tags pip3 is trying to find in wheel files.
In the past I also have seen issue with pip default version (9.0.1), make sure you are running a recent version (e.g. pip-20.0.2):
apt install python3-pip && pip3 install --upgrade pip

ImportError: No module named watchdog.observers

I am stuck with this issue
ImportError: No module named watchdog.observers
I have done pip install and whatever I can find.
I am running on macOS --version Catalina.
Please help if you have any suggestions how to solve this.
Try importing a specific class/function:
from watchdog.observers import Observer
Try installing watchdog with root-privileges for your version of python:
sudo pip install watchdog
or
sudo pip2 install watchdog
or
sudo pip3 install watchdog
Seeing your code would be helpful.

ImportError: No module named azure.storage.blob (when doing syncdb)

I recently cloned a Django project of mine in a brand new machine, and went about setting up its dependencies. One such dependency was azure storages, for which I followed the advice here and simply did sudo pip install azure.
However, upon `python manage.py syncdb', I keep getting the error:
ImportError: No module named azure.storage.blob
I've tried to solely do sudo pip install azure-storage as well, but this doesn't alleviate my problem either. This shouldn't have been this problematic. What do I do?
As I know, this issue is due to the version of azure storage client library for python.The old version has only one blobservice.py file and
the newest splits it into three files such as blockblobservice.py, pageblobservice.py and appendblobservice.py. So, if you want to use BlockBlobService, you could install azure-storage 0.33.0.
The following steps help you to install azure-storage 0.33.0.
1.You could check the version using pip:
#pip freeze
2.If you see azure==0.11.0 (or any version below 1.0), uninstall it first:
#pip uninstall azure
3.Install azure-storage 0.33.0
#pip install --upgrade azure-storage
You may encounter some error about cryptography, you could run the following command to solve it.
#yum install gcc libffi-devel python-devel openssl-devel
#pip install cryptography
The references:
https://pypi.python.org/pypi/azure-storage
Failed to install Python Cryptography package with PIP and setup.py
Hope it helps. Any concerns, please feel free to let me know.
In my case my file where I was using the statement
from azure.storage.blob import BlobServiceClient
was residing inside azure folder and filename was azure.py too.
After renaming the folder and file, it worked.
Ubuntu 16.04TLS + Python 3.5
Nothing worked for me, however after some fiddling...
sudo pip3 uninstall -y $(pip3 freeze | grep azure)
sudo rm /home/YOUR_ACCOUNT/.local/python3.5/site-packages/azu* -r
sudo pip3 install --upgrade requests
sudo pip3 install azure-storage-blob
You cant use 'pip install azure' instead use the following commends:
pip install azure.storage.blob
and you might need:
pip install azure-storage-file-share

Resources