Other conda environments do not automatically activate in VScode git bash - pandas

I'm not really understanding what's happening with git bash and scripts in general. I'm just following a data science course and I'm trying to setup my environment nicely.
I first downloaded Anaconda3 and git bash. I'm also using git bash as my default terminal in VSCode.
I have 2 issues that are happening that are kinda of annoying.
When I start VS code, terminal (git bash) opens by default but does NOT activate conda. However, when I open a new terminal then it'll automatically "conda activate". I'm confused why it doesn't run it by default and I'm also confused why it runs it automatically when I open a new terminal session.
My other issue is that when I created a new conda environment called "pandas", for some reason this breaks that script that automatically activates the environment. As in that scripts works perfectly when I'm using the default conda interpreter "base" but if I change it, it'll just give me this error message when I open a new terminal.
C:\ProgramData\Anaconda3\Scripts\activate pandas
bash: C:ProgramDataAnaconda3Scriptsactivate: command not found
if I manually type in "conda activate pandas" it'll work.

Related

`-bash: rbenv: command not found` comes up every time I open a terminal on window. How do I fix this?

I have this bash: rbenv: command not found thing always coming up on my terminal whenever I open it and they appear four times as shown below.
I am using windows, please, how do I fix this? All solutions I have researched are tailored toward MacOs.
bash: rbenv: command not found
bash: rbenv: command not found
bash: rbenv: command not found
bash: rbenv: command not found
I am using windows, please, how do I fix this? All solutions I have researched are tailored toward MacOs.
The error is coming from bash, a Unix shell. It's unclear how that's running on Windows (perhaps Windows Subsystem for Linux?) but the MacOS (really Unix) instructions should work.
Presumably you installed rbenv in this Unix on Windows environment at some point and now it's gone. If you want it back, install it again.
If you want it gone, follow the uninstall instructions. rbenv will add a line rbenv init to your shell startup configuration files. In bash, look at your .bashrc and .bash_profile files in your home directory and remove anything to do with rbenv.
If you don't know how to use bash, see Introduction to Bash for more.

How to create environment.yml without using anaconda prompt

I have tried creating environment file but unfortunately I need anaconda software to run this command

How do I install JetBrains Rider via snap on Linux Ubuntu 20?

I am attempting to install JetBrains Rider on an Ubuntu Linux system using snap.
I use the following commands:
sudo apt update
sudo apt install snapd
sudo snap install rider --classic
It looks like it installs correctly.
I can seem to to figure how to actually start Rider.
How do I run Rider after it's been installed via snap.
Is snap the best way to install?
Enter the command snap run rider in the terminal and hit enter.
A first time installer will run letting you specify Rider customisation and other defaults.
Subsequently you can enter the command /snap/bin/rider in the terminal and hit enter.
Alternatively, create a Rider menu item by running the following command cp /var/lib/snapd/desktop/applications/rider_rider.desktop ~/.local/share/applications/
You will then also have the option to right click and "Add to panel"
Update: Adding /snap/bin to your path (the fact it is missing I suspect is a snap bug) will also fix this issue.
I opened up ~/.bashrc and added the following line at the bottom PATH=/snap/bin:$PATH
Saved and reloaded the file by executing source .bashrc
Now I can load rider from any bash terminal by simply entering rider and hitting enter.
I'm using Debian buster btw.
References:
https://snapcraft.io/docs/getting-started#heading--running
https://forums.linuxmint.com/viewtopic.php?t=319827

How do I stop iTerm2 from running xcodebuild and hanging when I open a window?

Since this morning, on my iMac (macOS High Sierra Version 10.13.6) any time I open an iTerm2 window (with Oh My Zsh installed), I see this:
It seems that it's trying to run xcodebuild and it's stuck. I never get a prompt, even after waiting a long time. I've tried pressing ctrl+C to end the process, and then I see this:
I'm not purposely trying to do anything with Xcode. I just want to use the command line. I've been working for months without this problem, and it just started today. Any suggestion for how I can resolve this and use iTerm like normal?
I had the similar issue.
This resolved the problem:
# sudo xcodebuild -license accept
I got the same issue with macOS Big Sur.
Tried all Google results and nothing works. Eventually, I found it was caused by setting Node.js v8.x as default in nvm, alias default to system will resolve the issue. Although I don't know why nvm need to run xcodebuild for Node.js v8.x.
I have got the same issue after updating my MBP16 with Big Sur today
I have checked my xcode command tools path with xcode-select -p and I found that the path was related to an older version of xcode (10.1 in my case, I do not remember the path, maybe /Applications/Xcode_10.1.app/Contents/Developer/).
I have reinstall xcode command tools (sudo rm -rf /Library/Developer/CommandLineTools and xcode-select --install) and I have switched the xcode command tools path with this command sudo xcode-select -switch /Library/Developer/CommandLineTools
The issue is resolved now
Many answers but at the first start the console is still very slow (15s).
Looking around I found out that somehow nvm needs xcodebuild.
The slowdown was fixed changing the nvm default to system
nvm alias default system
Still not well clear why this is happening, I suggest to figure out trying to change the nvm configuration until you obtain the result.
The hanging I was experiencing happened only once after reboot, and consequent launches of the shell happened instantly.
I've spent hours debugging this issue. I eventually traced the hanging to homebrew's start script. My finding was that /usr/bin/git was slow at start (took 12 secs to load) for some reason and Homebrew used that binary unless another was installed. I installed a newer version of git through Homebrew using brew install git and this fixed the issue.
Investigation
I could see that the hang causes 100% CPU usage in syspolicyd and I could see a -67062 error at the end of the hang through Console.app (this error means code object is not signed at all). Unfortunately, the error log did not point me to a specific file and I had to add echos inside the brew script to isolate the exact location of the hang. It turned out to be an execution of git. Installing another version of git that would overwrite the default one fixed the problem. I used brew install git since homebrew checks its own directory first for a git binary.
I am not exactly sure how/why the code signature of /usr/bin/git is broken. It wasn't broken when I first installed Homebrew. It was somehow corrupted later on.

What is going on and how do I fix it?

https://prnt.sc/hlt4ey
I'm trying to get onto the xfce4 client from my chromebook (and it has worked before), however now this error is popping up. How do I fix this error?
My guess is you may not have the right user privileges. According to the error message you provided you are running an Ubuntu Linux environment.
If you haven't tried running the program through the terminal yet, attempt to do so.
The terminal can typically be opened by the key combination Ctrl+Alt+T on ubuntu linux.
Try using sudo command before running the program. This will run the command you enter using root privileges.
For example, if running the program on your terminal is
myName#ubuntu: xfce4
And this encounters an error, try to use sudo beforehand like so:
myName#ubuntu: sudo xfce4
Alternatively you can log in and not have to type sudo before every command.
myName#ubuntu: sudo bash
password:
If this fails you may need to update the package that contains the library. This can be done on the terminal in a fashion similar to:
myName#ubuntu: sudo apt-get install --only-upgrade xfce4