Giter VIP home page Giter VIP logo

cpsc360-sp24's Introduction

CPSC 360

PyGame and PyOpenGL Setup

Installation

  1. Download software:
  1. Install software (to default location)
  • Visual Studio Code
  • Anaconda
  1. Create python virtual environment and install PyGame and PyOpenGL

Windows

Create and activate Anaconda virtual environment
  • Open Anaconda Promopt Command Window
  • type conda create --name cpsc360 python=3.8
  • type conda activate cpsc360
Install PyGame
  • type pip install pygame
Install PyOpenGL and PyOpenGL_accelerate from downloaded files
  • Navigate to the folder where you downloaded PyOpenGL-3.1.6 and PyOpenGL_accelerate-3.1.6
    • For example, cd Downloads\cpsc360
  • type pip install PyOpenGL-3.1.6-cp38-cp38-win_amd64.whl --force-reinstall
  • type pip install PyOpenGL_accelerate-3.1.6-cp38-cp38-win_amd64.whl --force-reinstall

MacOS

Create and activate Anaconda virtual environment
  • Open Terminal
  • type conda create --name cpsc360 python=3.8
  • type conda activate cpsc360
Install PyGame using pip
  • type python3 -m pip install -U pygame
Install PyOpenGL and PyOpenGL_accelerate
  • type python3 -m pip install PyOpenGL PyOpenGL_accelerate
  • Note: if you got errors when running the above command, try one of the following
    • pip install PyOpenGL PyOpenGL_accelerate
    • pip3 install PyOpenGL

Run the helloworld code

  1. Download code
  • Under this github repo, go to Code -> Download Zip
  • Alternatively, if you are familiar with git/github, you may also clone the code from: https://github.com/trudiQ/cpsc360-SP24.git (pull only)
    • if you want to save and upload your changes, fork it to your own repo before changing anything
  1. Open VScode
  • Install Python extention
  • Open code folder, e.g.,'cpsc360-SP24'
  • Select Interpreter: Python 3.8.x ('cpsc360') # 'cpsc360' is the conda environment you just created
  1. Run python file 'helloWorld.py'
  • Rotate the object: Hold the left-button of your mouse and drag the mouse (trackpad may also work!)
  • Reset the object: Press '0' on your keyboard

cpsc360-sp24's People

Contributors

trudiq avatar hpeasley18 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.