Question: I don’t understand why in my console I get this code?
Welcome to Ask! This has something to do with the new Python template. If it bothers you, use the following steps:
- Click the three dots and “Show hidden files”
- Navigate to
- Create a new line at the top (make this line 1) containing
run = "clear && python3 main.py"
Thanks, where is the file
.replit located? I don’t see it on my screen under files so just wondering where it is.
Ah you will have to click the 3 dots and show hidden files first. Then it will show up near the bottom. I’ve had the hidden files shown for so long in my settings that I overlooked that step. My apologies.
Add it to the very beginning. Make it line 1.
Amazing that worked! Thank you so much!
Hello @kkwatanabe01! I just want to chime in to explain why you see that output.
First, this is not a bug. That command is actually what gets run when you click the “run” button. The executable file you are running is:
/nix/store/zqk3m21442kvpjwd3rh41wdavqkzkyik-python3-wrapper/bin/python3 which is a file provided by the Python Nix module. As the name suggests, it’s a wrapper for the actual python executable. Which sets
PYTHONPATH correctly and adds runtime libraries that allow popular python libraries like numpy or pandas to work out of the box. If you type in the shell
which python3 you’ll find the same executable, which means if you type
python3 main.py it will use that specific one!
So as you can see, the run button is doing the right thing!
Having said that, due to the confusion expressed by multiple users, we’ll hide the
/nix/store/zqk3m21442kvpjwd3rh41wdavqkzkyik-python3-wrapper/bin part from the console from this week on.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.