Forums

How can I install a module without Pip?

I made a custom module that only exists as a file on my computer. I was able to just place it in my bin previously. How would I install it here?

It is not up on github

Just upload it somewhere in your PythonAnywhere home directory and then add the directory it's in to your PATH.

The PATH in my import statement?

Like

import requests import /home/ExperimentsWithCode/twitterTester/CUSTOM-MODULE

or in some config file. Sorry I'm really not all that well versed in messing with that kinda of stuff.

Read up on sys.path

Basically either add it to sys.path at runtime, or change the environment variable to include it.

Also, you could just put the module into your project and then import it directly from there.