I am unfamiliar with below error and how to fix it, it happens when I start the terminal in ubuntu 14.04.3. I do not send any command only press crtl+alt+T. It seems to indicate that something is missing from PATH but I'm not really sure what. Thank you :).
Command 'lesspipe' is available in the following places
* /bin/lesspipe
* /usr/bin/lesspipe
The command could not be located because '/usr/bin:/bin' is not included in the PATH environment variable.
lesspipe: command not found
Command 'dircolors' is available in '/usr/bin/dircolors'
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
dircolors: command not found
Command 'ls' is available in '/bin/ls'
The command could not be located because '/bin' is not included in the PATH environment variable.
ls: command not found
cmccabe#HP-Z640-Workstation:~$
Related
I have tried to print simple messages like "Hello World!" but have always been met with: [Running] python -u "/Users/user/HelloWorld!!/app.py"
/bin/sh: python: command not found
[Done] exited with code=127 in 0.176 seconds
enter image description here
Is there any way to get passed this error?
Check environment variable PATH
Every time you as a user run a command on your console, the machine looks for its location, or address, inside a list of predefined directories that are stored inside the environment variable PATH.
Such design helps to properly run the program or command without having to specify the absolute path on the terminal.
The environment variable PATH can be modified temporarily for the current terminal session, or permanently.
For windows/mac/linux
AND
Go to the VS Code preferences, and under interpreter, you'll find Interpreter Path, so set that to the path of your python installation, restart VS Code, and you should be good.
When I start neovide from my applications and run :checkhealth I get errors that node and other commands are not available. But when I start it from my terminal there is no error for those commands. I tried to copy and modify the neovide desktop file to start just nvim and see if there if something wrong with my my neovide installation. But also starting just nvim as application prints the same errors.
I'm using linux with plasma desktop
TL:DR; add a path variable
Depending on your configuration, nvim will need to know the environment to run some executables (like it is with node in your example). An easy solution is to add the path variable to the exec command in the according .desktop file. I remember that I had the same issue with node not being recognized in a configuration using my plasma installation. On gnome node was recognized and healthchecks were good, so I thought I didn't need the extra path. Later on I realized that I had trouble with other commands. E.g. when using fdfind to complete path commands. Again I had to search what the reason was and it also was the missing path.
To give an example, let's say you are using zsh and want to start neovide with multigrid enabled, the Exec line in your desktop file could look like:
Exec=zsh -c "source ~/.config/zsh/.zshrc && neovide --multigrid %F"
I tried to add the path in the remote computer by using this command:
PATH="$PATH:/new/path";export PATH
and after add the path I used the numactl command and I found this message;
numactl: execution of `fiscof2': No such file or directory
what is that mean?
So I'm having a lot of trouble getting my node module command line commands to run correctly.
For example if I try and run gulp I get a
>gulp
'gulp' is not recognized as an internal or external command,
operable program or batch file.
So I have tried making my environment variable NODE_PATH
%APPDATA%\npm\node_modules\
%APPDATA%\npm\node_modules
%APPDATA%\npm
but none of these seem to work. The only command I can use to get my gulp to run with is
C:\Users\Aaron\Documents\GitHub\2015fallTeam14>node %NODE_PATH%gulp\bin\gulp
[12:10:32] Using gulpfile ~\Documents\GitHub\2015fallTeam14\gulpfile.js
It would appear that cmd is not running my node with my NODE_PATH variable along with my command, but I do not know how to to fix this
You need to set the system PATH variable to tell the command prompt where to find gulp.bat (which npm creates).
This has nothing to do with Node itself.
I had add the following
Edit "PATH" environment variable and add %APPDATA%\npm
from
https://stackoverflow.com/a/27295145/4249440
Im not sure why this works though. I would like to know how the cmd knows to run node on this file path.
I’m trying to run a Python script via a desktop icon/shortcut/launcher on a Raspberry Pi using Raspbian and LXDE. I have to use a desktop launcher since the script has to be started via a tiny touchscreen only accepting left-clicks and without a keyboard.
I think that I have a permission issue since the script fails at a point where it should execute some system commands which require root.
The script works if I do the following:
Open a terminal
Enter sudo python3 program.py
I tried to replicate this behavior with a .desktop file using the following config:
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Exec=sudo python3 program.py
Terminal=true
Icon=path/to/icon.png
Name=Program Launcher
I suppose I missed something obvious, but since I don’t work with Linux usually I’m a bit lost here.
Edit: The problem was not a missing permission but an incorrectly assumed working directory and is now solved. Sorry for my confusion.
In detail: during development the script was started from its own folder while the desktop launcher used /home/pi as working directory. In general that's not a problem, but in the script a hardcoded path was used and a required file not found when using the launcher. The real problem was sloppy swallowed and the status code of a permission issue returned. So it was simply a bad code issue.
As docs for desktop entries says:
The Exec key must contain a command line. A command line consists of
an executable program optionally followed by one or more arguments.
The executable program can either be specified with its full path or
with the name of the executable only. If no full path is provided the
executable is looked up in the $PATH environment variable used by the
desktop environment. The name or path of the executable program may
not contain the equal sign ("="). Arguments are separated by a space.
It leads to conclusion, that maybe python3 is not within $PATH used by the desktop environment. Try to check full path of your python3 and sudo with:
whereis python3
whereis sudo
on my Archlinux it gives me /usr/bin/python3 and /usr/bin/sudo. Try to modify your Dekstop entry to something like:
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Exec=/usr/bin/sudo /usr/bin/python3 program.py
Terminal=true
Icon=path/to/icon.png
Name=Program Launcher
Let me know if this helps.