0

enter image description here

I am working with Ubuntu 14.4 Trusty Tahr LTS on EC2. I want to use the Python 3.4.0 interpreter which is installed by default. I want to be able to be able to add git repositories to be accessed by python3.4.

I previously ran:

~$ sudo apt-get -y install git-core

but this appears to associate git repos with python2.7 How can I associate them with python3.4?

Hans
  • 1,281
  • 1
  • 20
  • 44
user1592380
  • 1,865

1 Answers1

2

There is a python library used to interact with Git repositories

It can be used in Fetching Remote Git Repo with Python, e.g..

There's also the old fashioned way

cd /path/to/git/repo
python3 my_favorite.py

But I think you will find Git to be Python version independent, and that possibly you want to associate Python code, files and extensions with Python 3.4 rather than 2.7, and that would be via mime.types

How is it determined which application is to open a file of specific mime-type?

How to change the default application for a given type of file in Ubuntu Linux

For example, I use Idlex as an IDE. I've added text/x-python=idlex3.desktop to the ~/.local/share/applications/mimeapps.list file. Now, double clicking on a Python file opens that file in the IDE to be looked at, edited, and/or run.

Nodak
  • 680
  • 4
  • 10
  • Thank you! Regarding https://www.gitorious.org/git-python. I havre to figure out how to get easy install for python 3 . I tried : sudo easy_install GitPython which installs in python2.7 directory. – user1592380 Feb 26 '15 at 15:32
  • @user61629 there are some troubles with GitPython . e.g., util.py has a few parts needing modification for P3 and dependency gitdb doesn't play nicely. I'm a bit sorry I mentioned it. – Nodak Feb 26 '15 at 16:04