gitpod-io / gitpod

The developer platform for on-demand cloud development environments to create software faster and more securely.
https://www.gitpod.io
GNU Affero General Public License v3.0
13.02k stars 1.24k forks source link

python version change #1518

Closed geet2019 closed 3 years ago

geet2019 commented 4 years ago

case 1 : Unknown option: -- usage: /home/gitpod/.pyenv/versions/2.7.17/bin/python [option] ... [-c cmd | -m mod | file | -] [arg] ... Try `python -h' for more information. Need: python3 I am trying to execute deepmind_research/alphafold_casp13 in gitpod . I need to execute it in python 3.6+ .Is it possible?. how ?

case 2 : recurrent geometric network

I need python 2.7.17 but executing in 3.8.2 how can I change it and

jankeromnes commented 4 years ago

Hi @geet2019,

Gitpod workspaces come with both Python 2 and Python 3 installed via Pyenv.

You can specify which version of Python you want to be default via the pyenv CLI tool, e.g. by doing:

pyenv local 3.8.2

This will create a .python-version file which controls what is the default Python version in the current directory (so you can have different Python versions in different directories).

You can then commit the .python-version file to your repository.

Also, you can see exactly which Python versions are available by running:

pyenv versions
jankeromnes commented 4 years ago

Alternatively, you can also use the explicit aliases python3 and python2 in your Terminal without having to configure anything.

geet2019 commented 4 years ago

thank you

geet2019 commented 4 years ago

gitpod /workspace/rgn $ pyenv local 2.7.17 gitpod /workspace/rgn $ python --version Python 3.8.2

geet2019 commented 4 years ago

gitpod /workspace/rgn $ pyenv local 2.7.17 gitpod /workspace/rgn $ python --version Python 3.8.2

Regards Geethu S

On Sat, May 16, 2020 at 10:04 AM Jan Keromnes notifications@github.com wrote:

Alternatively, you can also use the explicit aliases python3 and python2 in your Terminal without having to configure anything.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gitpod-io/gitpod/issues/1518#issuecomment-629586969, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN4XXYCDUWSMGW4C2FBIVH3RRYJWTANCNFSM4NCXQ2CA .

jankeromnes commented 4 years ago

@geet2019 Oops, sorry about that.

What does pyenv versions give you?

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.