1

I have tried to install Python3.7 for Windows. After that I tried to install packages such as numpy, all works fine. However, when I tried to install matplotlib, the following error found:

 * The following required packages can not be built:
                            * freetype, png
                            * Please check http://gnuwin32.sourceforge.net/packa
                            * ges/freetype.htm for instructions to install
                            * freetype
                            * Please check http://gnuwin32.sourceforge.net/packa
                            * ges/libpng.htm for instructions to install png

And then when I tried to install opencv-python, I got the following error:

 Could not find a version that satisfies the requirement opencv-python (from versions: )
No matching distribution found for opencv-python

How can I fix the problems?

user6539552
  • 1,331
  • 2
  • 19
  • 39
  • 1
    In pypi there is no supported matplotlib library for python 3.7 . https://pypi.org/simple/matplotlib/ – dedsec Jun 30 '18 at 15:08
  • but it can be used in linux python3 – user6539552 Jun 30 '18 at 15:11
  • 1
    Yes python 3.6 is the latest supported version for these packages, which is known as python 3 in linux env or mac env. You can downgrade your python to 3.6 and try installing these packages. – dedsec Jun 30 '18 at 15:27

1 Answers1

2

Python 3.7 just released 2 days ago and not many modules are not supported on Python 3.7 yet. If you don't really need Python 3.7, then downgrade to Python 3.6 to download packages.

Or

Download Anaconda 5.2 to use matplotlib and opencv in Python 3.6. Here is Anaconda Download link for Windows: [link] (https://www.anaconda.com/download/#windows)

I recommend to download Anaconda for using both matplotlib and opencv.

YoungChoi
  • 324
  • 4
  • 14
  • Thanks. I'm going to try this out. I'm new to Windows Development. I found that I have installed python3.6.5 through Visual Studio. But I have no way to execute pip / anaconda through powershell. I also cannot find where it has installed the packages. Any hints on that? – user6539552 Jun 30 '18 at 15:17
  • @user6539552 Glad it helped! Please consider accepting my answer. Also, for pip, this link can help you to install pip in powershell. [link] (https://stackoverflow.com/questions/30963446/how-to-install-packages-with-pip-in-windows-powershell) – YoungChoi Jun 30 '18 at 15:30