Installing the Swampy Python module on Windows

后端 未结 6 491
迷失自我
迷失自我 2020-12-07 02:58

I am trying to install the Swampy module on Python, but there is a lot that is unclear in the instructions given on the site and the documentation. I have put the Swampy fo

6条回答
  •  一生所求
    2020-12-07 03:35

    Now you're ready to install a package. There's lots to chose from but we'll start here...

    Download swampy at http://pypi.python.org/pypi/swampy/2.1.1 This is a swampy-2.1.1.tar.gz file, which in Windows language means it is a strange and otherworldly kind of zip file.

    To open the *tar.gz file, download PeaZip for Windows http://peazip.org/ Use PeaZip to extract (uncompress / unzip) swampy-2.1.1.tar.gz into your Download directory. You should end up with something similar to this: C:\Users\Nnamdi\Downloads\swampy-2.1.1\

    Go back to your Command Prompt window or open a new one. You'll need to change directories in the command line to your user directory in the computer.

    When you start, your command line should look something like this: c:\Users\Nnamdi> You want to get into the swampy-2.1.1 directory, so at the command prompt type this: cd downloads\swampy-2.1.1 or the complete path: cd c:\Users\Nnamdi\Downloads\swampy-2.1.1 Your prompt will change from this c:\Users\Nnamdi> to this c:\Users\Nnamdi\Downloads\swampy-2.1.1>

    Now for the fun part. Inside that swampy directory there is a file called setup.py. We're going to install that into the Python universe. Type this into the Command Prompt :

    python setup.py install

    Now open IDLE (Start > All Programs > Python 2.7 > IDLE (Python GUI)) and type the following:

    import swampy.TurtleWorld See all that nothing that happens? That's your sign of success. Congratulations. You've just installed and imported your first package for Python on Windows 7. Repeat as needed.

提交回复
热议问题