Score:0

$PATH - No such file or directory (but all files and directories exist)

bv flag

I am running Ubuntu 22.04 LTS and at first when I was attempting to use a script that would do the following:

. ~/.bashrc

conda activate {env}

I would receive an error that conda init needs to be run. However, I had ran it and then did it again as prompted but nothing was modified. So after some searching, I decided to check my PATH variable and I receive this:

10:55:42  |base|local@office-dana-group ~ → $PATH
bash: /home/local/mambaforge/bin:/home/local/mambaforge/condabin:/home/local/.local/bin:/usr/local/sbin:
/usr/local/bin:
/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:
/usr/local/games:/snap/bin:/snap/bin: No such file or directory

The thing is that all these directories and files exist so I cannot determine why I am receiving the 'No such file or directory message'

tm flag
Use `echo "$PATH"` to show the contents of the variable. Using the variable alone means bash tries to run the contents as a command - which doesn't exist indeed.
muru avatar
us flag
`$PATH` isn't a commend to be run. It's a variable, and you can use, e.g., `echo "$PATH"` or `declare -p PATH` to show the variable's contents. You're trying to run the entirety of `home/local/mambaforge/bin:/home/local/mambaforge/condabin:/home/local/.local/bin:/usr/local/sbin: /usr/local/bin: /usr/sbin:/usr/bin:/sbin:/bin:/usr/games: /usr/local/games:/snap/bin:/snap/bin` as a command, and of course such there's no file
Score:0
tr flag

to add a path to your $PATH variable, add this to your .bashrc file

export PATH=$PATH:/path/to/your/command

To reload your .bashrc file, run exec bash

Levente avatar
cn flag
I have hard time interpreting what does the line starting with `export`. Could you please allow insight into what it means?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.