Skip to content

Commit 037e43e

Browse files
authored
Fix problem with python command not found when using python extension (#13)
* alias python3 and pip3
1 parent 1fc207f commit 037e43e

2 files changed

Lines changed: 39 additions & 1 deletion

File tree

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,6 @@ RUN code-server --install-extension ms-python.python
2929
RUN code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools
3030
RUN code-server --install-extension redhat.vscode-yaml
3131
#ADD vscode-settings.json /home/coder/.local/share/code-server/User/settings.json
32+
33+
RUN alias python=python3
34+
RUN echo "alias pip=pip3" >> ~/.bashrc

README.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,47 @@
11
# What is vscode-python?
2+
23
A docker image based on https://github.com/cdr/code-server tailored for python programming.
34

5+
It aims to provide a state-of-the-art IDE with some modules adapted to `Python` to help developers.
6+
47
# How to use it
5-
Please visit https://github.com/cdr/code-server for knowing how to use this image.
8+
9+
To run a `Python` script in interactive mode, create a new file with `.py` extension, write some commands, e.g.
10+
11+
```python
12+
import pandas as pd
13+
pd.DataFrame([0, 1, 2])
14+
```
15+
16+
and press ```SHIFT + ENTER```
17+
18+
If you need a package, e.g. `flask`, open a terminal and run
19+
20+
```shell
21+
pip install flask
22+
```
23+
24+
Please visit https://github.com/cdr/code-server to learn how to use this image.
625

726
# How to contribute
827
If you find something is missing for general python programming with this image, don't hesitate to let us know, either with an issue or by submitting a PR.
928

1029
# Tips
30+
1131
- Use [Settings Sync](https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync) to sync up your custom configuration and extension and start a new properly tuned session in a heartbeat.
1232
- The paste shortcut in the terminal is: ```SHIFT + INSER```
33+
- To execute code use ```SHIFT + ENTER```
34+
35+
# Run in a local container
36+
37+
First pull the image:
38+
39+
```shell
40+
docker pull InseeFrLab/vscode-python
41+
```
42+
43+
```shell
44+
docker run -it -p 127.0.0.1:8080:8080 -e PASSWORD="YOUR_PASSWORD" InseeFrLab/vscode-python
45+
```
46+
47+
:tada: open your browser at `http://localhost:8080/` and use the password you chose (e.g. `YOUR_PASSWORD`)

0 commit comments

Comments
 (0)