There's a piece of code to import media, open python Self contained IDLE, Input :

>>>import media

It will prompt that there is no media This module !

original media Module is not the standard module of the system , You need to install third-party software before you can use it . This library is in PyGraphics in , however PyGraphics Rely on some other library . Can be installed like this ( Please refer to here :http://packages.python.org/PyGraphics/install.html):

  1. download :Python Imaging Library 1.1.7 for Python 2.7--> install
  2. download pygame-1.9.1.win32-py2.7.msi--> install
  3. download :numpy-1.6.1-win32-superpack-python2.7.exe--> install
  4. download :ampy-1.2.3.win32.exe--> install
  5. http://pragprog.com/titles/gwpy/source_code download Download gwpy-code.zip After decompression code-->install-->PyGraphics-2.0.win32.exe--> install
  6. If you want to use in PyGraphics The tests in the package , You have to download and install Nose package , The method is as follows :
  • First , download :setuptool--> install
  • secondly , open cmd--> Go to the command prompt line , Keep the computer on the Internet at this time , Enter... At the command prompt  C:\Python27\Scripts\easy_install nose  enter , This will automatically download things from the Internet , Don't worry about it. ,Nose It will be installed automatically .

notes : there C:\Python27, Refer to python Folder in which , If it's different, it can be changed !

Now you can use PyGraphics All of the contents of the package ~~ for example :media modular 、picture modular 、pixel modular 、color modular 、sound Module etc. .

Okay , Now in IDLE Have a try import media, You won't have to report a mistake again !

from csdn Hua Qiushi

Reference resources :

http://bking.diandian.com/post/2012-03-09/14808071

http://packages.python.org/PyGraphics/

http://packages.python.org/PyGraphics/install.html

python Third party Library PyGraphics More articles about

  1. Commonly used Python Third party Library brief introduction

    If a strong standard library is established python The cornerstone of development , The rich third-party library is python The guarantee of continuous development , With python The development of some stable third library has been added to the standard library , Here you are 6000 Introduction of several third party libraries : Click here or visit ...

  2. PyCharm How to install python Third party libraries and plug-ins

    One . How to install python Third party Library : 1. There is a website for downloading and installing the third party library : http://www.lfd.uci.edu/~gohlke/pythonlibs/ Ctrl+f Search for third party libraries to download , ...

  3. [ Reptiles ]Windows How to install python Third party Library lxml

    lxml It's a very useful python library , It's flexible and efficient to parse xml And BeautifulSoup.requests combination , It's the standard pose for writing reptiles . however , When lxml run into sb. Windows, It's a huge pit . Fall in the installation trap ...

  4. 【Python Basics 】 install python Third party Library

    pip Command line installation ( recommend ) open cmd Command line Install the required third-party libraries such as :pip install numpy In the installation python Related modules and libraries of , We usually use “pip install   Module name ” perhaps “pyth ...

  5. python Third party libraries automatically install scripts

    #python Third party libraries automatically install scripts , Need to be in cmd Run this script in #BatchInstall.pyimport oslibs = {"numpy","matplotlib&qu ...

  6. python Third party Library requests Brief introduction

    One . Send request and pass parameters Simple demo: import requests r = requests.get(url='http://www.itwhy.org') # The most basic GET request print(r ...

  7. Python Third party library official website

    Python Third party library official website https://pypi.python.org/pypi How to deal with the package after downloading : Download it and put it in Python Of scripts In the folder (D:\Python3.5\Scripts), use cm ...

  8. python3.4 Learning notes ( 8、 ... and ) Python Installation and use of the third party Library , Package management tools

    python3.4 Learning notes ( 8、 ... and ) Python Installation and use of the third party Library , Package management tools A lot of people are installing Python When it comes to third-party libraries , I'm always troubled by a problem : What kind of files should I download ? When we click on the download page , commonly ...

  9. install python Third party Library

    Preface Contact python Programming is late , Basic grammar is easy to understand , But it needs to be used carefully , In particular, many third-party libraries may be used , This article will introduce python Third party library installation . Environmental Science System environment :win7_64; Python edition ...

Random recommendation

  1. Java Object pool of

    Singleton mode limits a class to only one instance , The object pool pattern is to limit the number of instances of a class . The object pool class is like an object Administrator , It uses Static list ( It's the pool for the object ) To store instances of a class with limited number of instances , Every instance has to add ...

  2. Object creation mode ------Abstract Factory( Abstract factory )

    1. Intention     Provides an interface for creating a series of related or interdependent objects , Without specifying their specific classes .2. Alias     Kit3. motivation         Suppose we're going to develop a game , Of course, in order to attract more people to play , The game can't be too difficult ...

  3. dede Of pagelist Labeled listsize Detailed explanation of digital attributes

    Reprint ▼http://blog.sina.com.cn/s/blog_a4f3bd4e01012c8n.html dede Of pagelist Labeled listsize Detailed explanation of digital attributes . See far seo We often use dream weaving to build various buildings ...

  4. Beta Agile sprint daily report ——Day2

    1. A brief account of the situation Beta Stage Scrum Meeting Agile development start and end time 2017.11.2 00:00 -- 2017.11.3 00:00 Discuss time and place 2017.11.2 On the evening of 9:30, Conference call ...

  5. Frame learning is Struts2( 3、 ... and )---OGNL Sum stack

    One .OGNL summary 1.1OGNL It's object graph navigation language (Object-Graph Navigation Languaged) Abbreviation , It's a powerful expression language , Through simple and consistent expression syntax , Can access Java Yes ...

  6. python The technique in —— Miscellany

    Miscellany zip Usage of about a = [1,2,3] b = [3,2,1] To traverse at the same time for x, y in zip(a, b): pass zip(a, b)=> [(1,2,3),(3,2 ...

  7. [ Solution ]SystemError: Parent module '' not loaded, cannot perform relative import Solutions for

    defects :__mian__ Cannot use relative Import PEP 328 Relative Imports and __name__ Description in : Relative imports use a module's __nam ...

  8. 04 Zabbix Core concept review

    04 Zabbix Core concept review 1. Monitoring four core functions : Data collection ---- Data storage ---- Data presentation and data analysis ----- The alarm    1.1. Data collection mode : SNMP: The monitored device must be enabled SNMP a ...

  9. Jenkins Automated build ( Two ) A lot of questions

    1. The reverse proxy setting is wrong System management page prompt , The reverse proxy setting is wrong , In fact, this is due to URL There's something wrong with the settings : Open system management --> System settings -->URL Jenkins URL There's something wrong with the settings , Change it , Get rid of jenkin ...

  10. python-day72--django Realized cookie/session

    COOKIE And SESSION One . Concept cookie Do not belong to http Scope of agreement , because http Protocol cannot remain in state , But the actual situation , We need it “ Hold state ”, therefore cookie It was born in such a scene .cookie ...