Ask Your Question
0

Fedora 25 -What are the correct steps to install Python3.5.2 as default?

asked 2016-11-30 10:58:35 -0500

maxtrinidad gravatar image

Seems hard to believe that I can't install Python 3.5.2 without going in circles finding and trying every possible solution. And, just to end up with the only way to run python3.5 from 'sudo su'.

The problem with this workaround is that I can't use VS Code Editor because it runs from the user profile and not the admin.

I'm trying to setup my Fedora 25 in order to connect to my SQL Server instances and use PowerShell with Python to access my data. So, I will be using PyODBC and TK/TCL.

So, what's the proper steps for install Python 3.5.2 and make it the default python to use in the system.

I Appreciate the help, Maximo Trinidad

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2016-12-01 16:07:00 -0500

andmalc gravatar image

Create a Python virtual environment ( https://docs.python.org/3/library/ven... ) and run vscode from within it. Python3.5.2 will be the default and python apps executed within VSCode will use it.

pyvenv-3.5 vscode.env # 'vscode.env' can be called anything.
source vscode.env/bin/activate
code  #runs VSCode
deactivate #do this when done and after closing vscode
edit flag offensive delete link more
0

answered 2016-11-30 16:48:00 -0500

Mechanizoid gravatar image

You shouldn't have too. Python 3.5.2 IS the default python on my Fedora 24 install. I haven't upgraded to 25 just yet but it should be just the same there as well. Have you tried typing python3 in at the command prompt? By default, Fedora comes with python 3, but it is set up so that you can also install python 2.7 side by side if you need it, or if a program installs it as a dependency. Therefore, you invoke the default python 3 by typing python3, and the command python invokes python 2.7 if it is present and does nothing if it is not. Python 2 is not installed by default. This confused me when I first opened up my Terminal and looked for python.

This is what it looks like when I type python3 at the command prompt:

$ python3
Python 3.5.2 (default, Oct 14 2016, 12:54:53) 
[GCC 6.2.1 20160916 (Red Hat 6.2.1-2)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

I didn't install Python 3.5.2, it was already installed on Fedora. Geany installed Python 2.7 as a dependency, but that's it as far as installing python went. Maybe you are having this trouble because you didn't need to install Python 3.5.2 yourself in the first place?

I hope this helps you resolve your issue!

edit flag offensive delete link more
0

answered 2016-11-30 14:26:53 -0500

aeperezt gravatar image
edit flag offensive delete link more

Comments

1

That looks like a proper way to screw up your system python!

geforce gravatar imagegeforce ( 2016-12-01 01:14:08 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-11-30 10:58:35 -0500

Seen: 5,106 times

Last updated: Dec 01 '16