Possible to use Windows installation of Anaconda in WSL2? - anaconda

And if so, how to do this?
I've only found instructions on installing anaconda through WSL2 but I already have it installed in Windows.
I found the below snippet to have WSL2 run my windows bash helper that stored my github credentials and was hoping for something similar.
git config --global credential.helper "/mnt/c/Program\ Files/Git/mingw64/libexec/git-core/git-credential-manager.exe"
Or if I have to install through WSL2 but can use that in Windows that would be fine too. I just would really prefer not to have 2 copies of it.

Related

How to install git on Windows 10 without Git Bash or GUI?

I am trying to install Git on Windows 10, but without Git Bash or GUI. I want to use Git in PowerShell and I would like not to bloat my PC. I know the install size is small, but that's not the issue.
I've tried going through the installer from git-SMC/Git for Windows a couple times, but it appears I can not opt out of GUI and Bash. Any idea how I can do this? Perhaps Chocolatey is of any use?
Thanks in advance!
You can use MinGit
MinGit is provided on the Git for Windows repository
https://github.com/git-for-windows/git/releases
It does not come preinstalled with Git Bash, GitK or Vi etc.
The github repo publishes portable and minimum versions of the binary releases which don't require installation. You could prune out the parts you don't want if you need to cut it down further.
https://github.com/git-for-windows/git/releases
Or instalation Using Chocolatey, if that will be ok for you
https://www.jamessturtevant.com/posts/5-Ways-to-install-git-on-Windows/#using-chocolatey
I started with Git and then removed everything except the following dirs:
\mingw64\libexec\git-core
\ssl
Rename git-core to cmd and move it up 2 levels and you don't even have to edit your .gitconfig.
Works like a charm for me.

Is there a solution to install DRAKE on my WLS Ubuntu 18.04

I'm trying to install "Drake" (text-based data workflow tool) in a (WSL) Windows Subsystem for Linux and I try the steps in the book Data Science At The Command Line's Chapter 06 and the Drake's github repository I've followed all the steps without any problem, but when I try to install "Drip" github repository with this code
$ git clone https://github.com/flatland/drip.git
$ cd drip
$ make prefix=~/bin install
I had this :
I desperately tried a few things like adjusting the java's environment variables for my windows system and in my WSL Ubuntu too, without success
My Windows Build is :
And my WSL is:
My problem was to install "DRAKE" a Data workflow tool, after being searching for a solution I heard about Homebrew a solution made initially for installing tools on macOS and it's available now for linux even for WSL!
like in magic just type the tool to install and it's automatically done even if it's requires dependencies
brew install drake
So for nubies like me it's a welcome tool which can save you a lot of time.

How to use scp command in conda

I'm trying to upload some files onto a remote server but the command scp is not installed on my laptop. I'm working with Anaconda on a Windows 10 machine and the server is a Linux machine with Ubuntu 18.04.
To my intuition, I think it's easier to install scp directly with conda than to install it on Windows (I'm actually using Anaconda Prompt rather than Windows DOS), so following the instruction of Anaconda website I ran
conda install -c remram scp
after which I reran the scp command, only to find scp still not installed.
I have double-checked other dependent tools like ssh and also updated my conda, but nothing worked.
Is it even possible to use scp on a conda environment when there isn't an scp on my computer? If so, what's the correct thing to do to make it available? If not, can anyone share a reliable way to install scp on Windows system?

How do I install Git for Windows software to a specific directory?

I have just downloaded the latest Git for Windows installer, v2.4. It appears to want to install to the standard Windows "Program files" (with-spaces-in-name) directory.
Since I have all my development code in a folder called (simply) "/bin" -- I want to see if there's a command line option or parameter to change the install directory.
In my case, these days I use a environment variable such as GIT_HOME for important software like git; so it would be useful if there was a way to apply that to things like git commands, etc once I have the program installed.
possibly related:
How do I change the directory in Git Bash with Git for Windows?
I also came across a few questions asking: "whereis git". That's answered above, however I take that as an indicator that others may want git somewhere else too.
To start the installer with a different installation path you can open a CMD terminal in the same directory as the installer executable and pass in an option parameter of /DIR="x:\dirname"
For instance, if you have version 2.17.0 for Windows 64bit and you want to install git to D:\git, you would run:
Git-2.17.0-64-bit.exe /DIR="D:\git"
The installer will launch as usual and you need to walk through the other options, but the install location will be the path specified.
Since I just ran into this problem because my SSD is filling up, I figured I'd share the solution I came to on Windows 11 with Git v. 2.37.2.
The best way I could figure was to uninstall Git, then in CMD Prompt use the suggested command from the Git website with an appended --location/ -l flag:
winget install --id Git.Git -e --source winget --location [drive:/directory]
where [drive:/directory] is your target for the install. Had no issues and verified it worked with a project.

Installing packages in native windows node.js

I am trying to get to grips with node.js, this looked like a fun tut http://net.tutsplus.com/tutorials/javascript-ajax/how-to-scrape-web-pages-with-node-js-and-jquery/ but I have only got the native windows version of node.js and I can't find a way to install any packages.
I have also looked at installing the binaries using chocalatey, but my version of vista doesn't have access to powershell. However, I do have a machine running windows 7 that I can switch to. If it isn't possible to install packages on windows version, I will switch to that machine and work through chocalatey.
Assuming you have the node.exe for Windows, npm has experimental support for windows. You can try working through the README.
Otherwise you can manually install packages on Windows. You will need to manually look at the package.json files for dependencies if you are going with option 2.
I have never tried it, but Scott Hanselman also has a post about getting node running on Windows.
Personally I have found its easier to just run a Linux VM since Windows support is kinda spotty right now.
The short answer is if you have git properly installed, you can open a cmd window, navigate to the directory containing node.exe, and run this:
git config --system http.sslcainfo /bin/curl-ca-bundle.crt
git clone --recursive git://github.com/isaacs/npm.git
cd npm
node cli.js install npm -gf
The more complete answer is that I posted a guide on how to install Node on Windows here. It also describes installing npm to manage packages. Let me know if it works for you.

Resources