In my current directory called processing
i have many folders, one of them is called segmentation
, there is many files in segmentation one of them is test.py
. In my terminal i am in processing
and i want to run test.py
from there, i tried python -m segmentation.test
but this command didn't work.
Asked
Active
Viewed 176 times
-1

Ronan Boiteau
- 9,608
- 6
- 34
- 56

user9127040
- 71
- 1
- 7
-
1Possible duplicate of [How to run Python script on terminal](https://stackoverflow.com/questions/21492214/how-to-run-python-script-on-terminal) – tripleee Jan 15 '18 at 08:43
1 Answers
2
If you are in the processing
directory and want to run the test.py
script inside the segmentation
folder, simply do this:
python segmentation/test.py

E. Ducateme
- 4,028
- 2
- 20
- 30

Ronan Boiteau
- 9,608
- 6
- 34
- 56
-
got this error `python: can't open file 'segmentation/test.py': [Errno 2] No such file or directory ` – user9127040 Jan 15 '18 at 08:26
-
Strange. Are you sure you are in the `processing` directory? Can you post the output of `ls`? And `ls segmentation`? – Ronan Boiteau Jan 15 '18 at 08:27
-