In the CodeHS Code Editor, you can install libraries via the Python Package Index.
To specify libraries to install, create a file named "requirements.txt". Within that file, write the name of each package on its own line.
Check out this sandbox program which that uses the requests library as an example.
When you run your program, the libraries will automatically be installed for use in your program!
Note: If you are working with graphics, be sure to enable the Display Server Graphics setting in the Code Editor.
Click on the "gear" icon (⛭) on the left-hand side to open up the Editor settings panel, then toggle the switch for "Display Server Graphics Screen" to On. Once this is set, you'll be able to see a graphics panel above the console:
Still have questions? Contact our team at hello@codehs.com to learn more!