Why won't my anaconda or command prompt open? - anaconda

I followed this answer: https://stackoverflow.com/a/58211115/20736561
Now that I have done this, I cannot open my command prompt or anaconda prompt. When I try to open it, it will flash for half a second on the screen, and then close. Does anyone know how to fix this?
I have tried to fix it by using:
conda init --reverse
However, this did not solve the problem.

Related

Source Bashrc has no effect

So I am extremely new to any kind of software development. Last week I installed Bash on Ubuntu on Windows to work on some coding for work. Unfortunately I did something wrong and had to reinstall everything.
I was almost done with reinstalling Bash on Ubuntu, when I accidentally closed the screen. Now I get exactly the same errors as previously, but I definately do not want to reinstall this again...
So what changed? Before my terminal was colored purple and green. Now, I only get white colors in the terminal. It looks something like this:
Image of terminal
Furthermore, after googling it said to apply
source ~/.bashrc
But then I get the error: "No such file or directory". Bash is installed because it does actually give
which bash -> /bin/bash
I also read that perhaps it could be my path, where $PATH gives me
bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program: No such file or directory
I was hoping that you'd have an idea what could be wrong, and best how to resolve it. I definately do not want to reinstall it AGAIN, because it took me too long already.
Hope you can help me!
Cheers,
Wessel
As stated by Jack, the configuration for bash should be in ~/.bashrc or similar.
What files are listed if you enter this command?
ls -a ~/
If you see .bashrc, you can edit it.
Here some ideas on colouring your prompt
https://www.howtogeek.com/307701/how-to-customize-and-colorize-your-bash-prompt/

Terminal -bash: command not found errors [duplicate]

This question already has an answer here:
How to restore .bash_profile on a mac? None of my unix terminal are working [closed]
(1 answer)
Closed 2 years ago.
I messed up something in my programming a few days ago that screwed up my terminal. My terminal now gives me the a bash error message with basic functions like ls, cd, or ssh. The error looks like this: -bash: ls: command not found , where the "ls" can be replaced with any shell command.
The only way I have found to make my terminal function, is by inputting: export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin" into ever terminal window I open, which can get very tedious.
It also refuses to run Python or Jupyter unless I type the aforementioned command in the terminal window first.
Go files also fail to run in terminal, and gives me a similar error message: -bash: go: command not found. This can be overcome by inputting: export PATH=$PATH:/usr/local/go/bin into the terminal window first.
I'm really worried about what is going on in my computer, and need my terminal to keep functioning in order for me to finish and pass this course (introduction to computer programming). Does anyone have any ideas as to what the problem may be, and how I could go about solving it?
Any help/advice would be greatly appreciated!!!
EDIT: I'm not sure if it is relevant, but I am using a Mac, and these problems started to occur after I attempted to download pygame (I say "attempted" because I never got a working version of pygame installed, though I did download several things in the process (XQuartz and a bunch of stuff from homebrew).
Check your .profile or .bashrc: one of those files might initialize your PATH incorrectly.
Set your PATH manually, then cd ~, and edit those two files to fix your PATH.

How do I reset Iterm to default?

I accidentally installed a zshrc script from this link https://gist.github.com/kevin-smets/8568070. But it completely ruined my current bash_profile and bashrc. I think it's using the zsh login shell on top of my terminal and iTerm. And now ,I have no idea on how to remove it.
I tried removing the com.company.iTerm.plist from preferences. But it still hasn't worked.
Any suggestions? I really need help.

Cygwin terminal window empty

I've just installed cygwin (64bit) terminal on Windows 7 64. When I open cygwin terminal from Start menu, I can only see empty terminal window with blinking cursor. I can issue commands and see output, but prompt is missing (at least $ should be there, right?)
Any ideas how to fix it? It is fresh installation of cygwin on fresh Windows 7 64bit Enterprise.
Start with issuing the command
echo xyz
To find out if you are actually at a blank command prompt. If that responds with the output of xyz then check your prompt with
echo $PS1
And then set it
export PS1='\h \w> '
This should give you a prompt. If the first step itself does not give you a prompt you have other problems.
Another option is to start the bash shell from windows command prompt:
c:>c:\cygwin\bin\bash --login
Assuming you have installed cygwin in c:\cygwin
First,
I'm using window64 too, but it can work with cygwin32, please try with cygwin 32
If not, please try install cygwin again from another miror

Accidently quit updating ZSH in the middle and can't type any commands

I was upgrading everything in homebrew and zsh was upgrading and I was cycling through my open applications and accidentally closed iterm during the update. Now I can't open iterm and when I open the terminal I get the following error message:
login: /usr/local/bin/zsh: No such file or directory
I am not sure how I can switch back to bash until I correctly update zsh. I also can't type a single command in either iterm or termianl which makes sense (there's no zsh file). How can I finish upgrading zsh correctly or switch back to bash?
I have done a good amount of research and can't find someone having a similar issue.
Any guidance to how to solve this issue would be much appreciated, I currently can't do any of the development work I need to do.
Found this on Apple's suport site. Basically, you want to launch Terminal and go into Preferences. Change Shells open with from Default login shell to a valid shell (I recommend /bin/bash or even /bin/sh just to get you working again).
Once you can access your shell session, you can restore zsh.
Here's the full article... http://support.apple.com/kb/ta27005

Resources