Forums

Change default python version to Python 3.7

Please upgrade my system image to have Python 3.7.

I need to run bash by default on python 3.7

Your account already has Python 3.7 available (along with 3.8 and various other versions). You can run it from bash by using the python3.7 command.

The command python without a version number has to start Python 2.7, because that is what the operating system requires.

Hello. Can u do the same for me? My bash console using Python 2.7. I cant install Pillow because of that. Set it pls to Python 3+ Thank you

Your account already has Python 3.7 available (along with 3.8 and various other versions). You can run it from bash by using the python3.7 command.

The command python without a version number has to start Python 2.7, because that is what the operating system requires.

Thank you, Glenn Sorry for stupid question, but i cant resolve Pillow problem. When im add image on my site i have error "No module named 'PIL'" On Bash Console i wrote pip install --user Pillow and get this error

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/ latest/development/release-process/#python-2-support

If i run Python3 pip install --user Pillow it will get error python3: can't open file 'pip':

Help me pls, Glenn Sorry for newbie(

If you want to install a package for Python 3.7, use pip3.7. That said, Pillow is already installed on our systems -- are you seeing some behaviour that makes you think it is not?

Giles, thank you so much. Its all working now. Find answer here https://www.pythonanywhere.com/forums/topic/14553/

  • i went to Web page
  • scrolled until Virtualenv section
  • clicked Start a console in this virtualenv
  • run 'pip3.5 install Pillow'
  • reload my web and all working now Thank you for your pations

No problem. Glad you got it working.

Hello! Can you enable Python 3.7 in my account too? (balhissay) Thanks!

Sure! One word of warning first -- because of the changes to the point releases of Python (eg. 2.7.6 to 2.7.12), any virtualenvs you have might break -- and if you're not using virtualenvs, the pre-installed Python modules will be upgraded so that might break any code you have that relies on the old installed versions.

If you're happy for us to switch you over despite that, then let us know.

Thank you, maybe I'll do it over the weekend when there's less traffic. How do I contact you/relevant person when I want to switch over?

Write to support@pythonanywhere.com and we will arrange something for you.

hi , wanted to run a django project on python 3.7, but am not able to do so. are there any commands for creating a virtual environment with python 3.7?

When you create a virtualenv, you can specify which version to use -- for example, this would create a virtualenv called myenv with Python 3.7:

mkvirtualenv myenv --python=python3.7

Then, when you are inside that virtualenv, pip and python will use the version that you selected when you created it.

Hello! Can you enable Python 3.7 or Python 3.8 in my account too? Thanks!

Sure! One word of warning first -- because of the changes to the point releases of Python (eg. 2.7.6 to 2.7.12), any virtualenvs you have might break -- and if you're not using virtualenvs, the pre-installed Python modules will be upgraded so that might break any code you have that relies on the old installed versions.

If you're happy for us to switch you over despite that, then let us know.

Yes I would like to update the python version on my account. I already say to conrad to do this. But, how I don't know who is responsible to do this I'm also saying to you hahah

Ok. That's done.

Hi, I need an update of my python version to 3.8... Can you please do something Thanks a lot

Hi, I am also stuck on 3.5 and would like an upgrade please. Thanks.

Same for me, I would like to have Python3.6 and 3.7 available on my account.

Also, why do we have to request this via a forum post instead of having it available by default?

You have to request because that change may break your code.

Due to changes to the point releases of Python (eg. 2.7.6 to 2.7.12), any virtualenvs you have might break -- and if you're not using virtualenvs, the pre-installed Python modules will be upgraded so that might break any code you have that relies on the old installed versions.

I can do it if you want.

Yes upgrade mine please.

@fjl Ah that explains it, thank you. You can add 3.6 and 3.7 to my account.

Please add 3.7 to my account, too. Thank you! Ben

@MichaelCurrin, @TreeofPython, @Btaub -- no problem, that's done now. Any new consoles you start will have the new system image. Websites, scheduled tasks, and always-on tasks will pick it up the next time they're restarted. I haven't updated the version of Python started by the python3 command or the version that is used by default when you hit the "Run" button in the editor, but those can be switched over it you like -- just let us know which versions you would like for that.

Thanks! I think I'm set.

Please, can you upgrade my bash console to 3.8 too? Thanks!

@Chiri Your account already has python 3.8. Use python3.8 command.

Thanks, I have 3.8 available and used it to setup a virtual environment. No further changes needed for me.

OK -- we'll leave that as-is, then.

Please, can you upgrade my bash console to 3.5 too? Thanks!

@devstart16 your account is upgraded. Any new consoles you start will have the new system image. Websites, scheduled tasks, and always-on tasks will pick it up the next time they're restarted. I haven't updated the version of Python started by the python3 command or the version that is used by default when you hit the "Run" button in the editor, but those can be switched over it you like -- just let us know which versions you would like for that.

Hello! Please upgrade my system image to have Python 3.7. Thank you!

done, thanks!