Launch the Python interpreter from Git bash

After updating Git for Windows from 1.9.5 to 2.7.2, python ...

python interpreter does not start

Start Git Bash with C: \ Python27 in your PATH. When you hit python, it's ..

$ python

... it doesn't come back.

Countermeasures

Write the following alias around ~ / .bashrc. (And load it with source ~ / .bashrc)

bash


alias python='winpty python.exe'

Solution

$ python
Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec  5 2015, 20:32:19) [MSC v.1500 32 bit (
Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

It came to start.

Other

By the way, when I installed ipython with pip, the following was added to alias all the time.

alias ipython='winpty ipython.exe'

As a result of investigation, the following mechanism is set. State from Git 2.5.2 (2). vscode-alias.PNG This can be found in /etc/profile.d/aliases.sh. It is a mechanism to alias if the command passes the path.

Recommended Posts

Launch the Python interpreter from Git bash
Get the contents of git diff from python
Use httpie from windows git bash
Existence from the viewpoint of Python
Use the Flickr API from Python
Operate Maya from an external Python interpreter using the rpyc module
python launch
Learning notes from the beginning of Python 1
Launch the Discord Python bot for 24 hours.
Run the Python interpreter in a script
From Python 3.4, pip becomes the standard installer! ??
Python garbled in Windows + Git Bash environment
Learning notes from the beginning of Python 2
[Python] Get the main color from the screenshot
Let's parse the git commit log in Python!
[Bash] Use here-documents to get python power from bash
sql from python
MeCab from Python
Operate the schedule app using python from iphone
Use the nghttp2 Python module from Homebrew from pyenv's Python
Call Polly from the AWS SDK for Python
From easy git installation to docker startup python
Try accessing the YQL API directly from Python 3
[Python] How to remove duplicate values from the list
Learn Nim with Python (from the beginning of the year).
Touching the latest physics-based renderer Mitsuba2 (2) Running from Python
[Python] Extract the video ID from the YouTube video URL [Note]
[Python] Get the text of the law from the e-GOV Law API
[Python] Specify the range from the image by dragging the mouse
Output the time from the time the program was started in python
Study from the beginning of Python Hour1: Hello World
[Python] logging.logger Outputs the caller's log correctly from the wrapper
Get the return code of the Python script from bat
Python points from the perspective of a C programmer
How to use python interactive mode with git bash
I wanted to use the Python library from MATLAB
Find the part that is 575 from Wikipedia in Python
How to instantly launch Jupyter Notebook from the terminal
The first step to getting Blender available from Python
Call your own python module from the ROS package
Study from the beginning of Python Hour8: Using packages
Install the latest Python from pyenv installed with homebrew
A little bit from Python using the Jenkins API
Use thingsspeak from python
Find the maximum Python
Touch MySQL from Python 3
Python interpreter prompt change
Use fluentd from python
Access bitcoind from python
Changes from Python 3.0 to Python 3.5
Changes from Python 2 to Python 3.0
Python from or import
Use MySQL from Python
the zen of Python
Run python from excel
Install python from source
Execute command from Python
Operate neutron from Python!
Use MySQL from Python
Operate LXC from Python
Manipulate riak from python