I tried to install Pygame was n my iMac OS 12 in Terminal using the information on this site :
http://brysonpayne.com/2015/01/10/setting-up-pygame-on-a-mac/
When I got to step 4 , installing Home Brew it didn’t work.
I decided to forget the idea for now , however now im now having issues with Terminal .
Most specific the Ls command comes back as
-bash ls command not found
From what I have read it seems that I changed the default file path in Terminal , I don’t know how to fix this.
I’m hoping someone has an answer.
Thanks
John
I was able to find the answer:
export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"
I typed this in and lo and behold it was fixed !!!
Related
I am using hyper terminal. I wrote the following code to change the theme, but it gave the following error.
Command to change theme: hyper i verminal
zsh: command not found: hyper
How can I solve this?
Thanks in advance.
I had this problem too. After some tinkering, this command worked for me (assuming you have the hyper app in the mac applications folder):
sudo ln -s "/Applications/Hyper.app/Contents/Resources/bin/hyper" /usr/local/bin/hyper
I used this answer from another question about how to get Sublime Text's zsh command working.
On macOS Monterey the way to install new themes is to click on Tools at the menu bar in Hyper, then Install Hyper CLI command in PATH, then it will allow you to install said theme from the Hyper website such as "hyper i verminal", you will then see a message saying that verminal has been installed successfully.
Add its bin path to system variable. And then install the themes. Worked for me.
Sorry if this is a stupid question. I use python/jupyter a lot and it's stopped working after updating from Mac OS High Sierra to Big Sur. I'm trying to figure out why, but I'm not great with command line stuff.
The problem. When I try python3, pip -v, conda, etc. it says "command not found". python still seems to run, but it's 2.7 and I know I had 3 (I probably had a few versions from untidy file systems). I want to avoid reinstalling all my packages and things again, because I know it's still there and I've done this a few times already.
Some clues. I know this OS upgrade moves me from bash to zsh. I've tried just switching back to bash with chsh -s /bin/zsh but it still says command not found. I also noticed the OS update creates a Mac HD (below System/Volumes) within my Mac HD, and in that second one seems to be still all my python3/conda/pip/etc. folders. Not sure if/how this matters. Or if this is just a path issue.
I just want to get Jupyter running again on my Mac without reinstalling all my myriad packages from square one. Any help appreciated!
After extreme toil and research, I finally found something that worked for me.
Find the location of your Anaconda3. For me it was in ~/opt/anaconda3
Open terminal and type source <location of anaconda3>/bin/activate and then in the next line, write conda init zsh
Close your terminal and open it again. You should see a prefix (base) when you open it again.
All in all, for me it was
rko3 ~ % source opt/anaconda3/bin/activate
rko3 ~ % conda init zsh
Let me know if this works for you!
PS. You may be tempted to change $PATH variables. Anaconda advises against that. Use this reference instead that suggests the above. https://docs.anaconda.com/anaconda/install/mac-os/
I've just resolved this exact issue on my machine after upgrading to Big Sur from Mojave.
The issue: MacOS, as of Catalina, no longer lets you use the system root folder. Anaconda used to install in this folder. After upgrading from Mojave to Big Sur, you'll likely find your anaconda3 folder, including all your environments and packages, located here: /System/Volumes/Data/anaconda3.
Here is what to do to fix it:
Open Terminal
Move the anaconda3 folder:
sudo mv /System/Volumes/Data/anaconda3 ~/
Download Anaconda's Conda Prefix Replacement (crp) tool:
curl -L https://repo.anaconda.com/pkgs/misc/cpr-exec/cpr-0.1.1-osx-64.exe -o cpr && chmod +x cpr
Run the CRP tool (this will take a few minutes):
./cpr rehome ~/anaconda3/
Source anacoda3
source ~/anaconda3/bin/activate
Initiate conda
conda init
Quit Terminal and open it again.
Edit: Someone didn't like that I ended this answer with "That's it! Enjoy". In the scenario described, the steps above were indeed all it took to resolve the issue. If you're experiencing the same issue, I hope this helps resolve it, so you can get back to enjoying your updated OS.
Seems like your environement is not activated. Zsh sources ~/.zshrc while bash sources ~/.bashrc.
You can copy lines related to conda from your ~/.bashrc to your ~/.zshrc.
AF
Open the Anaconda navigator and click on the Environments section. There you will see the base (root) and a green triangle next to it.
Click on the triangle and select Open Terminal.
Now, in the terminal you will be already in the necessary directory for anaconda and you can then update any packages.
For example, just by writing conda update --all you can update all packages available for updates.
I found couple of answers but none of them was helpful, I downloaded omnetpp for MAC (omnetpp-5.6.1-src-macosx.tar) if i open the IDE directly I get "“Omnetpp” is damaged and can’t be opened." I tried installing it like 5 times. I found that I should execute setenv, I got this error "Error: not a login shell -- run this script as 'source setenv' or '. setenv'"
Can someone please help me with the steps to install/use omnetpp? Thank you so much in advance.
As the error message suggests:
first open a terminal window
change to the omnetpp installation directory i.e. cd ~/omnetpp-5.6.1 or similar.
source setenv
./configure
make -j4
omnetpp
You have to put the "omnetpp-5.6.1" directory right in the home path: i.e. ~/Users/yourname
Open the "doc" directory in "omnetpp-5.6.1" directory and there you can see an installation guide which helps you what to do step by step.
Do the instruction. be careful writing the command ./configure it may not work. If it doesn't you should use ./configure WITH_TKENV=no WITH_QTENV=no instead of that.
Also before you run $ make command in terminal you have to run $ . setenv .
I did the instruction but I couldn't run the software yet, then I noticed that the problem is my java version!
write:
$java -version
in your terminal it will show you the actual version your system is using, It must be java8 for running this software if it's not, try to downgrade or upgrade it to java8
I hope it helps you! GL!
I am new here to ask my first question.
I wanted to run fiddler2 on my Mac and I have downloaded the install package from the official website, which contains ".exe" files in it. And the installation guide tells me that I should install Mono Framework first.So I follow the guide and installed the Mono.But when I type in
mozroots --import --sync
in the terminal.It told me "command:mozroots not found".
Then I type
man mozroots
it showed me the description of mozroots. It looks like command mozroots exists in my Mac.
I searched many sites but there is no answer for it.
Could anyone tell me how to figure out this?
My mac is rmbp 2016 , macOS 10.12.4
After installing Mono, try to open new terminal session. $PATH probably is not updated.
$ which mozroots
/Library/Frameworks/Mono.framework/Versions/Current/Commands/mozroots
$ echo $PATH
.../Library/Frameworks/Mono.framework/Versions/Current/Commands ...
On my Mac OSX 10.6 machine, I started to use MacVIM for vim. Then I noticed my terminal version was different to the MacVIM version (MacVIM was 7.3 and my terminal version 7.2)... I thought they used the same vim?
I need 7.3 for some of the features. So I set about wanting to update the terminal version. I basically cloned it using Mercurial (the perferred way according to the official site) and then did the usual to compile it. This did work and I now have 7.3 in my terminal. But, on some commands when exiting, I can this error:
/bin/bash: q: command not found
shell returned 127
Press ENTER or type command to continue
...I've tried my hardest to try and fix this problem, but trying to reinstall MacVIM, deleting the vim in my /usr/local/bin and compiling again and I just can't get rid of this annoying error.
Can anyone possibly help me? Am I doing this all wrong? ...most of the time I will be using MacVIM, but it'd be nice for me to have it in the Terminal - exactly how I'd have it on my Ubuntu servers.
Any help would be fantastic!
:!q is not :q!. This is probably not a bug.
The error message you're seeing is is most likely the result of accidentally typing :!q instead of :q!, which would be user error, not a bug. :!q shells out to run q, and your shell (bash) is not finding such a command and bails with 127. (For comparison, you might try :!true, :!false, :!vim %, to get a feel of this.)
There isn't really a “fix” for this, and ! is really useful for other purposes; maybe with more practice you'll make the typo less often. You could also try using ZQ instead of :q!; this has other disadvantages (a typo ZZ will instead save the file if it's edited, and ZQ specifically is a vim extension), but at least you see this error again.
The upshot here is basically check to make sure you typed in your commands right, I guess.
I'm not sure on the exact path, but somewhere a few folders deep into the Applications/MacVim.app folder is the vim executable that will also run in a terminal (Use the -g option to launch it in GUI mode).
You should be able to throw this in your .bashrc:
alias vim=/Applications/MacVim.app/Contents/MacOS/vim
This is the homebrew formula for vim. Try these settings for "configure" or just install homebrew and install vim from there.
system "./configure", "--prefix=#{prefix}",
"--mandir=#{man}",
"--enable-gui=no",
"--without-x",
"--disable-nls",
"--enable-multibyte",
"--with-tlib=ncurses",
"--enable-pythoninterp",
"--enable-rubyinterp",
"--with-features=huge"
system "make"
system "make install"