Forums

Wrong interpreter in web with env

Hey guys,

Webapp: - Python version: 3.6

ENV: - Python version: 3.6 (created with mkvirtualenv myenv --python=python3.6)

Now my problem: When I run my flask app it says: "Loading Python3.9 interpreter..." Isn't that wrong?

Also: I just want to implement the sentence_transformers library (with from sentence_transformers import SentenceTransformer). It was installed with the command pip3.6 install --user sentence_transformers

But it throws an error: function '_has_torch_function' already has a docstring

I'm really lost here right now :(

Error

As you can see there is the lib/python3.9 path and not python3.6 path

You run it in the console that knows nothing about your web app python version. add #! at the top of your file.

Thank you. I added the #! to the top of my file.

Still the same. Restarted webapp .. no success.

https://i.ibb.co/Kr4wcMT/integrated.png

I figured out, that I had to use #!python3.8 and not only #! (thx support for NOT mentioning it)

enter image description here

I give it one more shot now here with pythonanywhere. I have a running script locally and I can't get this running here on pythonanywhere. So please support, be so kind and try to tell me why my (simple) code is not working. I don't use env's. I simply can't get sentence_transformers to run.

Thank you.

I think there's a bit of confusion here. You do not need to run your Flask app from the editor in order to have your website up and running; you just need to configure it on the "Web" page, and then it will be run whenever it's needed to process requests.

Is there a particular reason you're trying to run it from the editor instead?