10

My machine runs on Windows and I tried to find out about it but people only talk about mac and brew on other discussions. I want to ask if there is a command line which I need to write which can upgrade the core or I have to download 3.6 package from the official website and then uninstall the 3.5 and then install 3.6 (and I don't want to do that because it sounds mess to me)

I have 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:01:18) [MSC v.1900 32 bit (Intel)]

Any help?

Milan
  • 1,743
  • 2
  • 13
  • 36
P.hunter
  • 1,345
  • 2
  • 21
  • 45
  • 1
    You can select your interpreter explicitly - `C:\Python36\python.exe my_file.py`. Or you can use unified Windows runner: `py -3.6 my_file.py` for 3.6, `py -3.5 my_file.py` for 3.5. – Łukasz Rogalski May 19 '17 at 06:27

3 Answers3

3

I think you have to download Python 3.6 package, but no need to uninstall the 3.5 Version (you can have both)

Keep in mind that the custom libraries you where using with python 3.5 have to be installed for 3.6 too, but you can do that with pip easily

Changing the interpreter from pycharm can be achieved when creating a new project:

enter image description here

or from default settings for an already created project:

enter image description here

Norbert Forgacs
  • 605
  • 1
  • 8
  • 27
1

On Unix it would be fair enough to correct softlinks. On Windows as far as I see people resort to playing around with paths. Here is the most detailed answer.

Community
  • 1
  • 1
gonczor
  • 3,994
  • 1
  • 21
  • 46
1

If someone's using MacOS, Linux or WSL then can use asdf.

  1. Clone the asdf repository
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.8.1
  1. Edit ~/.bashrc file and add $HOME/.asdf/asdf.sh

  2. Restart your terminal and you'll be able to use asdf

  3. In order to add the plugins, in your case Python, you can run this -

asdf plugin add python
  1. List all the versions of python -
asdf list all python
  1. Install the version as per your requirement (can install the latest one) -
asdf install python latest
  1. Set the installed version globally, locally (for a particular project) or for this particular shell .
asdf global python latest
Germa Vinsmoke
  • 3,541
  • 4
  • 24
  • 34