plt2_install.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # View more python tutorials on my Youtube and Youku channel!!!
  2. # Youtube video tutorial: https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg
  3. # Youku video tutorial: http://i.youku.com/pythontutorial
  4. # 2 - install
  5. """
  6. Make sure you have installed numpy.
  7. ------------------------------
  8. INSTALL on Linux:
  9. If you have python3, in terminal you will type:
  10. $ sudo apt-get install python3-matplotlib
  11. Otherwise, if python2, type:
  12. $ sudo apt-get install python-matplotlib
  13. -------------------------------
  14. INSTALL on MacOS
  15. For python3:
  16. $ pip3 install matplotlib
  17. For python2:
  18. $ pip install matplotlib
  19. --------------------------------
  20. INSTALL on Windows:
  21. 1. make sure you install Visual Studio;
  22. 2. go to: https://pypi.python.org/pypi/matplotlib/
  23. 3. find the wheel file (a file ending in .whl) matches your python version and system
  24. (e.g. cp35 for python3.5, win32 for 32-bit system, win_amd64 for 64-bit system);
  25. 4. Copy the .whl file to your project folder, open a command window,
  26. and navigate to the project folder. Then use pip to install matplotlib:
  27. e.g.
  28. > cd python_work
  29. python_work> python -m pip3 install matplotlib-1.4.3-cp35-none-win32.whl
  30. If not success. Try the alternative way: using "Anaconda" to install.
  31. Please search this by yourself.
  32. """