The PythonAnywhere help pages
Many of your questions about PythonAnywhere are likely to be answered below. If
not, the best place to get support is in
our Forums and
EU Forums. We monitor them to make
sure that every question gets answered, and you get the added benefit that
other PythonAnywhere customers can help you out too. They're also a nice place
for a chat
If you want, you can access an even broader group of people by asking your questions on StackOverflow; we check all posts there tagged with pythonanywhere daily, and reply if no-one else has already solved the problem.
But if you want to ask your questions in private and get responses over email, you can use the "Send feedback" link at the top of any page on PythonAnywhere. We'll be alerted and will get back to you ASAP. You can also email us directly via support@pythonanywhere.com
If you want help about Python programming generally (as opposed to PythonAnywhere), you can buy 1:1 live Python help at Codementor.
We also have a page that lists books and courses the people have recommended to us here.
See details of our education features: PythonAnywhere Education beta
The help pages below have the following sections -- hopefully you can jump straight to one that describes what you're looking for help with!
- I'm a beginner learning Python
- Web Applications and Hosting
- Static Files and Content Delivery
- Domains and HTTPS
- Web-Related Errors and Troubleshooting
- Databases
- Virtualenvs and Package Management
- Consoles
- File Management and Development Tools
- Scheduled Tasks and Always-On Tasks
- API and Integration
- System Configuration and Settings
- Resource Management and Performance
- Account Management and Security
- Networking and External Access
- Third-Party Services, Libraries and Languages
- General Error Handling and Troubleshooting
I'm a beginner learning Python¶
New to Python? Start here for guides on learning Python programming and getting familiar with the PythonAnywhere platform.
I want to start learning Python
[account in US servers]
[account in EU servers]
- Courses and other learning materials
- Installing new Python modules for yourself
- How can I use a specific version of Python with the "Save & Run" button?
- Using the file browser
- The file editor
- Changing the font size in a PythonAnywhere console
- How do I share my code online?
Web Applications and Hosting¶
Everything you need to know about creating, configuring, and managing web applications on PythonAnywhere. This covers all major Python web frameworks and deployment options.
I have a web app on my local PC and want to deploy it on PythonAnywhere
[account in US servers]
[account in EU servers]
Basic Web App Setup¶
- How to create a web application on PythonAnywhere
- Deploying an existing Django project on PythonAnywhere
- How to host a static site on PythonAnywhere
Web App Configuration and Management¶
- Reloading the web application after you've made changes
- Dealing with "there was an error reloading your web app" messages
- How do I create a web app that redirects from one domain to another?
- How to point a new domain at an existing web app in the Web tab
- Global State and Web Apps
Django¶
- How to follow the Django Tutorial on PythonAnywhere
- How to setup static files under Django
- The Django admin's CSS isn't working
- Running Django code in consoles, scheduled and always-on tasks with custom management commands
- I'm getting a 400 Bad Request error from my Django app
- How can I use a more recent version of Django for a new project
Flask¶
- General Flask tips, including avoiding app.run() and how to run database config with db.create_all()
- Dealing with 504 and 502 errors in Flask applications
- Using Flask's send_file function with BytesIO
Web2py¶
- How do I change my admin password in Web2py?
- Admin is disabled because insecure channel
- Web2py: how to do a fake migration to change database hostname
- How do I run the web2py scheduler?
- Migating Web2py from SQLite to MySQL
- How do I set up different apps for different domains in Web2py?
Other Frameworks¶
- Using Dash
- Using CherryPy
- Using Tornado (WSGI-only mode)
- Using Jam.py
- Using Web.py
- How to use Mezzanine on PythonAnywhere
- How to connect production React frontend with a Python backend
- How to connect production Vue frontend with a Python backend
ASGI (async) sites (beta)¶
- Using the API to run ASGI sites on PythonAnywhere (beta)
- Deploying ASGI sites on PythonAnywhere (beta)
- Deploying Flask sites on PythonAnywhere with our experimental website system
- Deploying Flask-SocketIO sites on PythonAnywhere (beta)
- Deploying Streamlit apps on PythonAnywhere (beta)
Static Files and Content Delivery¶
How to serve static files (CSS, JavaScript, images) efficiently and troubleshoot common static file issues.
- How to use our static files service, and why you might want to
- Debugging problems with static files (js, css) not loading
- Using Cloudflare with PythonAnywhere
Domains and HTTPS¶
Setting up custom domains, SSL certificates, and HTTPS for your web applications.
- How DNS works: a beginner's guide
- Troubleshooting DNS problems
- How to use a custom domain for your web app
- Using Custom PythonAnywhere Subdomains
- Naked domains
- How to move a domain from one PythonAnywhere user account to another
- Using International Domain Names
- How to set up an autorenewing HTTPS/SSL certificate for a custom domain
- How to set up and install a custom HTTPS/SSL certificate for your custom domain
- How to force HTTPS on your web app
- TLS version support
Web-Related Errors and Troubleshooting¶
Common web application errors and how to debug them, including HTTP status codes and framework-specific issues.
- Why do I get a "403 Forbidden" or "[Errno 111] Connection refused" error when accessing a website from PythonAnywhere?
- I'm getting a 502 Bad Gateway error. How can I debug?
- I'm getting an Internal Server Error on my website
- How to handle slow/async work in a web app
- Getting the IP address of clients connecting to your web app
Databases¶
Setting up and managing MySQL, PostgreSQL, and other databases on PythonAnywhere, including connections, backups, and external access.
MySQL¶
- Using MySQL
- Accessing your MySQL database from outside PythonAnywhere
- Backing up (and restoring) MySQL databases using mysqldump
- How do I find out how large my MySQL database is?
- Using SQLAlchemy with MySQL
- LOAD DATA INFILE doesn't work
- Importing a database you have stored on your own machine to PythonAnwyhere
PostgreSQL¶
- Activating a Postgres server
- Accessing your PostgreSQL database from outside PythonAnywhere
- Creating Postgres backups
- Configuring postgres for your app (eg Django)
- Increasing the number of connections for your Postgres server
- Postgres Shared Memory Error
Other Databases¶
- Databases available on PythonAnywhere
- Database character sets (UTF8/Unicode etc)
- Using MongoDB on PythonAnywhere
- Connecting to Microsoft SQL Server
Virtualenvs and Package Management¶
Managing Python versions, virtual environments, and packages to isolate your project dependencies.
- What are these virtualenv things, anyway?
- Which Python versions does PythonAnywhere support?
- Using a virtualenv for your web app
- Rebuilding a Virtualenv
- How to use a virtualenv in an Jupyter Notebook
- Python 3.7 virtualenvs on the "innit" system image
- Using conda
Consoles¶
Using PythonAnywhere's browser-based consoles and SSH access for command-line development.
- Changing a console's name
- Types of PythonAnywhere consoles
- I want to embed a live python console on my website
- The "Starting encrypted connection" message never disappears
File Management and Development Tools¶
Uploading, downloading, and managing your code files and development workflow on PythonAnywhere.
- Can I use FTP/Filezilla? How should I upload my code to PythonAnywhere?
- Copying and pasting in PythonAnywhere consoles
- Using external version control systems
Scheduled Tasks and Always-On Tasks¶
Running Python scripts on a schedule or keeping processes running continuously in the background.
- Setting up scheduled tasks
- Always-on tasks: how do I keep a console running forever? Or, how do I make a program that restarts automatically?
API and Integration¶
Using PythonAnywhere's API to programmatically manage your account and integrate with external development tools.
- Does PythonAnywhere have an API?
- Getting your API token
- Integrating a development environment with PythonAnywhere
- AI tools (Claude, Copilot, Cursor etc)
System Configuration and Settings¶
Configuring your PythonAnywhere environment, including system images, timezones, and environment variables.
- Can I edit my config files?
- Changing your system image
- How to set environment variables in web apps
- Setting the timezone for your code
- Fonts
Resource Management and Performance¶
Understanding and managing your account's resource limits, including disk space, CPU, and RAM usage.
- "Disk Quota Exceeded" (running out of storage space / maxing out your quota)
- RAM limits
- What are CPU-seconds?
- My site is slow!
- How many hits can my site handle?
- How do I get streaming/buffering to work?
Account Management and Security¶
Managing your PythonAnywhere account, security settings, and account deletion.
- Securing your PythonAnywhere account
- How do I completely delete my account?
- How do I solve authentication errors from Gmail when sending emails from my code?
- Details on the PythonAnywhere Bug Bounty
Networking and External Access¶
Configuring network access, static IPs, SSH, and external connections for your applications.
- How to get SSH access to your account
- Can I use SMTP to send email on a Free account?
- Requesting Allowlist additions
- What do I do if a server I want to connect to has an allowlist that only allows incoming connections from particular (static) IPs?
- IPv6
Third-Party Services, Libraries and Languages¶
Using external services and specialized Python libraries with your PythonAnywhere applications.
Web Scraping and Automation¶
- Using Selenium
- Using Playwright
- Can I use matplotlib to generate graphs from my data?
- Machine learning in website code
- Installing TA-Lib on PythonAnywhere
- How to I get Twilio to work?
- Working with PDFs and converting document formats
- Using NVM to get the most up-to-date version of node
- Testing a simple Javascript project using Jasmine
- Haskell
- Can I use Pygame / Tkinter / turtle / GUI packages?
- Compiling C Programs
General Error Handling and Troubleshooting¶
Common errors and troubleshooting guides for issues that can occur across different parts of the PythonAnywhere platform.
- Debugging import errors and sys.path issues in your WSGI file
- I'm getting "no such file or directory"
- I can't see what I'm typing in the console
- Typing problems international
- Notebook authentication error
- I'm seeing lots of
GeneratorExit
orOSError: write error
messages in my error log - Browser extensions that are known to cause problems with PythonAnywhere consoles