I am trying to run python on a hosted server. I'm using a Strato server.
The problem I have is that, when I run my Python code, it uses the Python 2.7 version - as it is set the default, and I've installed my python libraries in Python 3, so it shows an "500 Internal Error".
I tried to change the python path at the beginning of my python file to the Python 3 location, but it didn't work.
So, my question is, how can I run Python 3 (and not python 2) when opening the file?
Here's my code:
#!/usr/bin/python3
import requests
print("Content-Type: text/plain;charset=utf-8")
print()
print("Hello World!")
EDIT: I looked into the question that Maurice suggested, and checked my logs. As I supposed, the error says "No module named 'requests'", but I have it installed in Python 3, so it doesn't solve the problem