ModuleNotFoundError: No module named 'visdom' when importing visdom - python

When i'm trying to run the following from python console (pycharm)
import visdom
When I try to run:
module = self._system_import(name, *args, **kwargs)
I get the following error:
ModuleNotFoundError: No module named 'visdom'
I've tried to install it through pip (pip install visdom), pip3 (pip3 install visdom) and conda (all the following commands):
conda install -c conda-forge visdom
conda install -c conda-forge/label/gcc7 visdom
conda install -c conda-forge/label/cf201901 visdom)
None of the above commands produced an error.
I'm using a Mac if it matters.

Always include full traceback firstly in your question. With what i have encountered before, try the following
Upgrade pip,
python -m pip install --upgrade pip
They try,
python -m pip install visdom

I’ve encountered the same issue. I made it by installing visdom0.2.1 while the default version is 0.2.2.
following commands:
pip uninstall visdom
pip install visdom==0.2.1

Try to install with pip:
Install Python server and client from pip
Requires Python 3

Related

Unable to install a Python package

Whenever I try to install the SpeechRecognition package within my Python environment it keeps telling me You are using pip version 10.0.1, however version 20.3.3 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command., However, when I check the pip version I can see that it's on the latest version. The package doesn't install and continues to show this message.
Also just an off question, what does the -m wildcard do for the pip install command?
Any ideas?
Thanks in advance,
-Yaseen
Try to upgrade the pip using this command:
python -m pip install --upgrade pip

pip install pyinstaller no module named pyinstaller

I wanted to install pyinstaller module with the following command:
pip install pyinstaller
But I always get the following error:
I tried everything, but finally i found the solution.
You just have to downgrade your pip from version 19 to 18.1 :
pip install pip==18.1
Then install PyInstaller :
pip install pyinstaller
.
As you see i managed to install it :
.
After that you can upgrade again your pip :
python -m pip install --upgrade pip
There seems to be a problem when using pip-19.0.1 because as the other answer suggests, using 18.1 works fine.
But also now pip-19.0.3 has been released and upgrading to that seems to fix the issue.
So I suggest you try to update pip and then install pyinstaller
python -m pip install --upgrade pip
pip install pyinstaller

Installing tensorflow on Anaconda

I have a linux machine to which i installed Anaconda.
I am following:
https://www.tensorflow.org/versions/r0.10/get_started/os_setup.html
pip instaltion part.
To be more specific:
which python
gives
/home/user/anaconda2/bin/python
After which i entered:
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0-cp27-none-linux_x86_64.whl
And after:
sudo pip install --upgrade $TF_BINARY_URL
However,
while trying:
python -c "import tensorflow"
I get an import error:
ImportError: No module named tensorflow
The 'sudo' makes pip install tensorflow outside the env. Try:
pip install --upgrade $TF_BINARY_URL
Just tested this on Ubuntu 14.04 w/ conda env, was able to reproduce (with sudo) and resolve issue (without sudo).
You can also check the "Using Conda" section of tensorflow.org. They list the below:
# Python 2
(tensorflow)$ pip install --ignore-installed --upgrade $TF_BINARY_URL
# Python 3
(tensorflow)$ pip3 install --ignore-installed --upgrade $TF_BINARY_URL
In anaconda, simply do:
for installation
conda install -c conda-forge tensorflow
for update/upgrade
# -f will force the current installation to upgrade
conda update -f -c conda-forge tensorflow

pip installs modules for python2.7 instead of python3.4

I have an Amazon EC2 instance. On that was just python 2.7 installed. So I installed Python3 with the command "sudo yum install python34".
Then I tried to install modules with "pip install package". The terminal told me, that I can upgrade pip. So i upgraded pip. No my instance either find the command pip or pip3.
I googled and find that I have to use "python -m pip install SomePackage" I installed a module and tried to start one of my scripts with "python3 script.py"
I got the information that my module still isn't installed. I tried to install it again. It showed me that my module is already installed but in the python2.7 folder.
So what is the right command to use pip with python3.4 instead of python2.7?
With all the following commands, I get the information that there is no module named pip or pip3:
"python3 -m pip install package"
"python34 -m pip install package"
"python3 -m pip3 install package"
"python3.4 -m pip install package"
"pip install package"
"pip3 install package" (Package already installed in python2.7)
"pip3.4 install package"
You can force package install for python3 by:
[sudo] python3 -m pip install [package]
try # pip install --upgrade pip. this would upgrade pip8.1.1(for python2.7) to 8.1.2(for python3) or
try this https://bootstrap.pypa.io/get-pip.py, it would install pip2 and pip3 as well as setup properly, so this is recommended.

Cannot upgrade pip in cygwing running on Windows 10: /usr/bin/python: No module named pip

In cygwin I can't upgrade pip, it worked find in cmd:
$ python -m pip install --upgrade pip
/usr/bin/python: No module named pip
Likely you don't need the python -m part. If pip is in your path, then just typing pip install --upgrade pip should work. Where is pip installed? which pip will tell you where it's located, if it's in your path

Categories