I am trying to install matplotlib using:
pip install matplotlib
However, I keep getting this error:
- cannot open include file 'ft2build.h' no such file or directory
Error Image
You are using python 3.8 for which no pre-built whl files are avialable on pypi, therefore your pip is attempting to build matplotlib from source. For this, you need to have downloaded and installed the dependencies of matplotlib. In this case, ft2build.h is missing which is part of the freetype library.
If you really want to build from source, there is a script based solution from the matplotlib developers to download and install all neccessary dependencies.
Since you probably don't care about building from source (which can be quite some work on Windows), you should instead consider one of these options:
Install a python version other than 3.8, it is very new and therefore there is not always an official pre-built whl file for modules you want to use
As MrFuppes suggested, download matplotlib‑3.2.0rc1‑cp38‑cp38‑win_amd64.whl from this unofficial collection of whl files and do pip install matplotlib‑3.2.0rc1‑cp38‑cp38‑win_amd64.whl in your cmd
It is a bit unclear what your problem is. It may just be that you have some packages that are not compatible. To avoid this sort of issue I can recommend the use of Anaconda: https://www.anaconda.com/
It will come with python and most basic libraries, including matplotlib. I can also recommend seaborn for professional-looking plots that do not require much code.
Related
I went to http://nipy.org/dipy/installation.html and install nibabel, then I when I wanted to install dipy, there where 2 problems:
Wheel was not built
and vcvarshall.bat not found.
What I did ?
Install Setuptools in site-pakcages
download Setuptools-34.3.1-py2.py3-none-any.whl (md5) and save in site-packages
I also try
python setup.py install --compiler=mingw32ç
and
If you get an error saying unable to find vcvarsall.bat then you need to create a file called pydistutils.cfg in notepad and give it the contents
[build]
compiler=mingw32
But setup.py de system it did not find, and I still have vcvarshall.bat not found.
what I need to do?
I am using, Windows 7, Python 3.5.1 and Anaconda 2.5.0 (64 bit)
You will almost certainly find it easier to install third-party packages if you adopt virtual environments. When done correctly you will then not need admin privileges to install packages into virtualenvs. The HitchHikers' Guide to Python contains more information about this.
The vcvarsall.bat is, I believe, a part of the Visual Studio (the Express version is available at no cost) environment. It's required when you are trying to build a compiled Python extension as described in this article. I'm not sure how that will play with mingw.
So, I installed via ANACONDA but , when I go to python, and I want to import dipy it says: No modle named dipy
Solved ! Well I had python 3.5 and dipy has some issues with that version, so I installed Anaconda with python 2.7 , installed visual c++9 and follow the steps on the web !
During the installation phase, I get this, "Unable to find vcvarsall.bat" error. The installation process did complete, though. However, I was unable to see the shell on my desktop (I am using windows) and neither was I able to open it manually. I scoured the internet for the error but was unable to find any solution for this case.
The installation process is through a superpack that downloads Python 2.7
SimpleCV is not receiving much love in the past few years, and most of it's code don't got upgrade like the libraries it depends on.
The problem you got is the Superpack trying to compile an older version of OpenCV.
When running the Superpack, you should have seen and redtext error, and if you try to run a code it should show you something like this:
File "C:\Python27\lib\site-packages\SimpleCV\base.py", line 59, in <module>
raise ImportError("Cannot load OpenCV library which is required by SimpleCV")
ImportError: Cannot load OpenCV library which is required by SimpleCV
There are a few paths you can try from there:
1. You can try to install Microsoft Visual C++ Compiler for Python 2.7
Uninstall everything SuperPack installed in your PC or it may not work
It may fixes some other uses when using pip.
Now you have to install SimpleCV again.
2. Try to install OpenCV(2.3) on your own:
You can use pip for it, just remember to chose 32bits to keep compatibility with (Super Pack)
Just run on CMD
pip install OpenCV or python -m pip install OpenCV
3. Give up on SuperPack and install everything on your own.
You can try this guide
https://github.com/sightmachine/SimpleCV#windows-7vista
Or use pip for all dependencies
numpy (Numpy+MKL make sure to install this one first)
scipy
PIL
ipython
svgwrite
pygame==1.9.1release
OpenCV
You can find a useful list of wheels here
http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv
Sources:
https://blogs.msdn.microsoft.com/pythonengineering/2016/04/11/unable-to-find-vcvarsall-bat/
http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv
https://github.com/sightmachine/SimpleCV#windows-7vista
I have tried this to install opencv. The terminal output after installing was:
OpenCV 2.4.13 ready to be used
But when I try to import the module, it says the module doesn't exist.
When I tried:
pkg-config opencv --cflags
to check if opencv was installed, I got:
Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opencv' found
How can I fix this? Is there any other way to install opencv?
Since you are using Python3, You can only choose to build your own cv2.pyd. There is no pre-built version for you to download.
I found another link of installing the Package, which is installing from the source, means that you need to compile the source code.
The general idea is to download the source code you want first. After that, yor will use CMake to build the libraries and the Python wrapper (based on the specific Python version you are using). After build successful, you will then get the cv2.pyd and several OpenCV libraries, you just copy them into your Python site-package. Finally you should be able to import cv2.
I did the same thing in Window for Python3.3, 3.4, and 3.5 by following this tutorial, the general idea is the same but only on different platform. I think it should be helpful as a reference for you.
I use Python 3.4
I try to install Cython and Numba but keep getting "Unable to find vcvarsall.bat".
I googled for the solution and found that I need Microsoft Visual C++ 2010 installed (for Python 3.4).
So I installed it.
And tried installing Cython and Numba ---> fail.
And then they say I must type "SET VS90COMNTOOLS=%VS100COMNTOOLS%" in the command prompt, which I did, like C:\Users\Dorky>set vs90comntools=%vs100comntools%.
And tried installing Cython and Numba again ---> fail.
Not enough with that, I also went to the environment variables to set this VS90 to VS100 thing manually.
And tried installing Cython and Numba again ---> fail.
So how exactly can I solve this special "Unable to find vcvarsall.bat" problem?
What the heck is so special with this vcvarsall.bat that the user must install Microsoft's programs in order to use it?
Why not just extract out this vcvarsall.bat file as an independent file and then just copy&paste it to any file or directory that needs and not bother with the rest of the software package?
Why not the Python team just extract out this vcvarsall.bat and incorporate it into its Python packages so whenever a user installs Python, he/she will also install vcvarsall.bat along the way and then Python would also know where to look for this file in case needing to install Cython or Numba or any other?
If you're using the python.org version of Python, there's a much easier way to go about things - grab the packages you're interested in from Christoph Gohlke's Python Extension Packages for Windows repository. He has a very large selection of mainly scientific computing-based Python modules, including Cython and numba (you'll need numpy - compiled with Intel's MKL - and llvmlite - which requires this - as well). Everything is precompiled into .whl packages that can be installed with an up-to-date version of pip. Most modules are kept updated with the latest versions on PyPI or other repositories.
This is definitely my go-to site for installing packages on Windows, and if what I'm looking for isn't there, then I'll install via pip or the package source.
I need to use scikits.bvp_solver in python.
I currently use Canopy as my standard Python interface, where this package isn't available. Is there another available package for solving boundary value problems? I have also tried downloading using macports but the procedure sticks when it tries building gcc48 dependency.
You can try to download the package tar.gz and use easy_install . Or you can unpack the package and use the standard way of python setup.py install. I believe both ways require a fortran compiler.