I have installed Komodo, set both Python and Python 3 to UTF-8 as well as default encoding to UTF-8. I have also installed Python 3.7 and selected add Path for environment. When running scripts I am getting the following error.
‘env’ is not recognized as an internal or external command,
operable program or batch file.
I do not know what to do at this point, please help.
What are these scripts you’re running? They appear to be trying to run a command called env at some point and you don’t have it on your system PATH so it fails with that error. I don’t know what this has to do with Python. That’s all I can determine so far from the info here.
Please tell us what exactly you’re trying to do, what you expect to happen and what these scripts are. If you can’t share the script due to IP (intellectual property) rules where you’re at then give us the gist.
I am trying to run some basic scripts from an online learning class from LinkedIn, so nothing is proprietary. The setup was based on a Mac, so perhaps that is the issue. I used env LANG=en_US.UTF-8 "%F% for my hot key to run the script and when I do so, it errors out. Let me know if you need more information.
Hi, instead of setting your environment variable in the command, just run the command by itself "%F" or python "%F", and in the “Advanced Settings” tab set the environment variable there.
@Hitesh_Chauhan, regarding @mitchell’s comment, look at your second screenshot. You can set environmental variables there instead of in your command.
But there is something wrong with your Komodo configuration. env should work fine. Check Edit menu > Preferences > Environment and make sure you have a PATH variable.
To summarize, you’re trying to use our tool that runs commands on the commandline. When you ran the command it was not able to find the binary on your path. env is on your system path by default on Windows so something is wrong with your system path.
If you don’t want to use key bindings then just double click it in the toolbox.
Thanks for confirming your path isn’t being overridden in Komodos prefs. Now confirm that env exist in your terminal. Open a Windows command prompt and try to run the same command.
Re @mitchell’s comment: have you tried setting your env var in the Advanced Options tab of the tools options dialog?
I think you need to contact the people that wrote the tutorial or something @Hitesh_Chauhan. That command you pasted into your Python shell is broken. It tells you why in the output: NameError: name 'platform' is not defined.
Unfortunately, this isn’t a problem with Komodo, it’s an issue with whatever guide/tutorial you’re using. I can’t help with that.
@Hitesh_Chauhan, it says it in the dialog, you need to configure Python in your preferences, Edit menu > Preferences > Languages > Python, in the Use this Interpreter browser to the Python interpreter.
Komodo should have picked this up for you if Python was on your system PATH.
Q1 | Open CMD prompt on your Windows machine and type python . What is the output ?
Q2 | Open CMD prompt on your Windows machine and type path . What is the output ?
@Hitesh_Chauhan, there is a subsection to that preference. See the > beside Languages? Click that THEN click Python.
@pranavdamele, those commands won’t output anything. Is that what your tutorial actually tells you to input into the commandline?
python just opens the Python shell. You should run python -V maybe?
path won’t print anything execpt something along the lines of this doesn't exist on your path. You’ll have to do echo %PATH% to get meaningful output.
Do you guys have a teacher to assist you with this stuff? The tutorial you’re following sounds like it’s missing a lot of information and is just broken in a lot of place.