Installing matplotlib using pip in cmd finishes without actually installing - python

I'm trying to install matplotlib library using pip from cmd (Windows 10), but the installation finishes after the download without actually installing the package. I don't get any error message, it just finishes.
cmd output:
C:\Users\username>pip install matplotlib
Collecting matplotlib
Using cached https://files.pythonhosted.org/packages/1a/c0/69e3f695d7384012e90be1e16570c08953baae00fd98094179ef87c7d5a2/matplotlib-3.1.1-cp37-cp37m-win_amd64.whl
C:\Users\username>
Trying without cached version doesn't help.
C:\Users\username>pip install --no-cache-dir matplotlib
Collecting matplotlib
Downloading https://files.pythonhosted.org/packages/1a/c0/69e3f695d7384012e90be1e16570c08953baae00fd98094179ef87c7d5a2/matplotlib-3.1.1-cp37-cp37m-win_amd64.whl (9.1MB)
100% |████████████████████████████████| 9.1MB 25.5MB/s
C:\Users\username>
I also tried downloading the .whl file and installing manually, same problem.
C:\Users\username\Downloads>pip install matplotlib-3.1.1-cp37-cp37m-win_amd64.whl
Processing c:\users\username\downloads\matplotlib-3.1.1-cp37-cp37m-win_amd64.whl
C:\Users\username\Downloads>
After all this matplotlib doesn't exist as an installed library. Other libraries are being installed and working fine without problems.
C:\Users\username\Downloads>pip show matplotlib
C:\Users\username\Downloads>
C:\Users\username\Downloads>pip show keras
Name: Keras
Version: 2.2.4
Summary: Deep Learning for humans
Home-page: https://github.com/keras-team/keras
Author: Francois Chollet
Author-email: francois.chollet#gmail.com
License: MIT
Location: c:\users\username\appdata\local\programs\python\python37\lib\site-packages
Requires: h5py, numpy, scipy, six, keras-applications, pyyaml, keras-preprocessing
Required-by:
I've done the whole exercise using pip3 also, the results are the same.
I've done this in cmd, powershell, and VSCode's powershell terminal as well, still same result.
Any idea what is happening here and how to solve it?
Note: I've replaced my user name with "username" in the cmd outputs.
Edit: I also tried installing a different version of matplotlib, but still getting the same result.

All I can think of is running this code from command line in the following order (Windows users):
python -m pip install -U pip
python -m pip uninstall matplotlib
This would pop the question: Proceed (y/n)?
y
python -m pip install matplotlib

Related

Cannot seem to download SimpleElastix: file.whl wheel not recognized/import not recognized

I'm trying to install SimpleElastix for python. As far as I can tell, you can either download a whl file from https://simpleelastix.github.io/#download
or simply pip install as shown here: https://pypi.org/project/SimpleITK-SimpleElastix/
I first tried downloading it and am trying to install SimpleITK-0.9.1rc1.dev163-cp34-cp34m-win_amd64.whl that I have saved to drive.
I am using the following (pip has been updated):
(hids3) C:\Windows\system32>python --version
Python 3.8.0
(hids3) C:\Windows\system32>pip --version
pip 22.0.4 from C:\Users\kated\anaconda3\envs\hids3\lib\site-packages\pip (python 3.8)
I try to run pip install SimpleITK-0.9.1rc1.dev163-cp34-cp34m-win_amd64.whl
and get the following error:
ERROR: SimpleITK-0.9.1rc1.dev163-cp34-cp34m-win_amd64.whl is not a supported wheel on this platform.
According to Error "filename.whl is not a supported wheel on this platform" , this could be caused by a downloading the .whl file for a wrong python version. I would expect python 3.8 to support a CPython 3.4 version or am I wrong for assuming this?
Alternative way to download SimpleElastix: https://pypi.org/project/SimpleITK-SimpleElastix/
I also tried running
pip install --user SimpleITK-SImpleElastix
in the terminal, which worked, but when I run
import SimpleITK as sitk
sitk.Elastix()
I get
AttributeError: module 'SimpleITK' has no attribute 'Elastix'
Anyone have any idea what I'm doing wrong in either case?

ERROR: Failed building wheel for numpy , ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects

I`m using python poetry(https://python-poetry.org/) for dependency management in my project.
Though when I`m running poetry install, its giving me below error.
ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
I`m having python 3.9 installed in my laptop.
I installed numpy 1.21.5 using pip install numpy, I even tried to down version it to 1.19.5.
Though I`m getting the same error.
I found out many people are getting ERROR: Failed building wheel for numpy this error in python 3.10, they solved it by down versioning python to 3.9, though that didnt working for me.
I solved it by doing the following steps:-
I updated the pyproject.toml(This file contains all the library/dependency/dev dependency)with the numpy version that I installed using pip install numpy command.
Run poetry lock to update poetry.lock file(contains details information about the library)
Run poetry install again, & it should work fine.
If you are having any problems, you can comment.
I`ll try to answer it.
I had this trying to install numpy with PyPy on macOS.
I solved the issue by first running brew doctor, which showed that my Command Line Tools (XCode) were outdated. Then I just followed the instructions to update them:
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
This solved the issue.
My configuration:
macOS 12.2.1 Monterey
> python --version
Python 3.8.12 (9ef55f6fc369, Oct 25 2021, 05:10:01)
[PyPy 7.3.7 with GCC Apple LLVM 13.0.0 (clang-1300.0.29.3)]
Numpy error solved
Error: failed to build wheels for numpy which is required to install project.tmol
This error cause due to outdated numpy version simply run this command
MATHLAB = "m" pip install numpy
`
My python version:
Python -V=3.9
It doesn't works in se case but most of the time works.
If you are working in venvthen try to install numpy in venv.
Then run your code it will be working
Fine.

Error installing chatterbot, stuck on spacy

I try to install chatterbot, but there comes a time when it's in a loop to install spacy. appears written:
Using cached spacy-2.1.8.tar.gz (30.7 MB)
Installing build dependencies ...
After waiting some time it returns 145 lines of errors.
I already have spacy V3.2.1 installed, I don't know what else to do...
I using:
Windows 11
Python 3.9.6
Install chatterbot from it's source: https://github.com/gunthercox/ChatterBot/archive/master.zip
Then unzip the file.
After open up cmd and type in: cd chatter_bot_master_directory
Finally just type: python(3) setup.py install
From this post

install librosa on raspberry pi 4, error with the wheel of llvmlite

Im working on raspberry pi 4, with Python3 and I want to install librosa. (pip3 install librosa)
Previously I installed llvm version 7.0.1
Following the Compatibility I install llvmlite https://pypi.org/project/llvmlite/
$ LLVM_CONFIG=/usr/bin/llvm-config pip3 install llvmlite=0.32.0
That block during the instalation of librosa or numba
Building wheel for llvmlite (setup.py) ... error
If someone has advice about how solve it, thank you to give me.
I got mine running by installing llvmlite==0.31.0, numba==0.48.0, librosa==0.6.3, colorama==0.3.9.
Command:
# specify a valid dependency tree with pi compatibility
LLVM_CONFIG=/usr/bin/llvm-config pip3 install llvmlite==0.31.0 numba==0.48.0 colorama==0.3.9 librosa==0.6.3
Note: colorama is used only to show colored output in the console, if the package causes you issues try removing it but otherwise keep it otherwise you will have errors while importing the module.
Thanks to Michael S. !
But actually the command should be:
LLVM_CONFIG=/usr/bin/llvm-config pip3 install llvmlite==0.31.0 numba==0.48.0 colorama==0.3.9 librosa==0.6.3
it should be == in:
llvmlite=0.31.0

downloading matplotlib python 2.7.1 windows 8

I want to use pyPlot, therefore install matplotlib.
When I downloaded numpy, I realized I already have pip on this python version (I have windows 8, using 64-bit)..
Now if I want to install matplotlib to my python, can I do it using some kind of command from the command line or do I need to install something first and then navigate to setup.py Directory and run:
python setup.py
when I try:
pip install matplotlib
or even installing it and using
pip install matplotlib-1.5.0-cp35-none-win_amd64.whl
it gives me error:
ValueError: failed to parse CPython sys.version: 2.7.9 |CUSTOM| (default,
Jul1 2015 03:41:50 ) [ MSC vs. 1500 64 bit (AMD 64)]
location of my python is:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Python 2.7
ANY HELP..?
Why not installing it with pip then?
pip install matplotlib
You either install it with pip: pip install matplotlib or download the binary from windows.

Categories

Resources