install scala 2.12 mac with homebrew - scala

I'd like to install the latest version of Scala => version 2.12.0-M5 on my mac using homebrew. Is it possible?
When I run command this is what I get
brew install scala
Warning: scala-2.11.6 already installed

$ brew remove scala
$ brew install scala --devel

https://gist.github.com/dimetron/4340744
This might solve your problem Thanks !

Related

Installing mongodb on M1 mac

I tried opening the terminal using Rosetta but when I run brew install mongodb-community#5.0 I get an error that says:
Error: Cannot install under Rosetta 2 in ARM default prefix (/opt/homebrew)! To rerun under ARM use: arch -arm64 brew install ... To install under x86_64, install Homebrew into /usr/local.
However, when I run it as arch -arm64 brew install mongodb-community#5.0, it again complains with:
arch: posix_spawnp: brew: Bad CPU type in executable
Any help would be appreciated.
Thanks in advance.
There are two versions of brew:
Intel version (in /usr/local/homebrew)
ARM64 version for Apple Silicone (in /opt/homebrew/)
When you just type brew you are probably using native ARM64 version, for which there is no mongodb server yet.
You can check which version is your default with this:
$ which brew
/opt/homebrew/bin/brew
The solution I find most practical is to define alias for Intel brew like this in .zshrc:
# arm64/intel brew
alias brew86="arch -x86_64 /usr/local/Homebrew/bin/brew"
alias brewARM="/opt/homebrew/bin/brew"
# ARM64 brew is default
eval "$(/opt/homebrew/bin/brew shellenv)"
Then you can use intel brew to install intel based apps like this:
brew86 install mongodb-community
brew86 services
...
And you can use ARM64 brew to install native ARM64 stuff like this:
brew install mongosh
Important note - do not use "Open using rosetta2" to launch terminal window in which you gonna run these commands. You wish to be in native ARM64, then install Intel apps only when is absolutely needed with brew86.
For some reason even though I had Homebrew in /usr/local the one for M1 was being executed. Solved it by manually navigating in /usr/local/Homebrew/bin and running the commands with ./brew.

Upgrade from networkx 2.4 to networkx 2.2

I would like to upgrade from "networkx 2.4" to "networkx 2.2". How to do this using python's pip command? Thank you
You can force a specific version with the == operator. pip should automatically uninstall the current version you have installed and install the older version:
pip install networkx==2.2

sudo apt-get install scala not found on ubuntu

I am completely stumped by why this simple sudo install is not working.
I am running ubuntu 16.04 on virtualbox on windows, and when i run the command
sudo apt-get install scala
command, I get the E:Unable to locate package scala error.
I have sudo apt-get update beforehand, and sudo apt-get install default-jdk worked
perfectly fine.
Does anyone have any idea why my ubuntu can't find the scala package?
There is a way to apt-get Scala, but you have to add the bintray repository to your sources file.
deb https://dl.bintray.com/sbt/debian / # access to Scala deb packages
I recommend against installing Scala with apt install scala, as the versions can be out of date (on Ubuntu 18.04 I got v2.11, while v2.13 is available). Instead go to the Scala webpage and install from there. If you want to be able to run
$ scala
and get the REPL, one option is to look for the .deb package on the install page and use that

How to install older version of sbt?

I am facing some "UNRESOLVED DEPENDENCIES" problem for my custom dependencies with latest version of sbt(0.13.8)
I want to install older version of sbt, Do we have any command by which I can install older version of sbt ?
You can define the sbt version by writing the one you need in /project/build.properties
It would be something like:
sbt.version=x.xx.x
Use the following command for a Debian-based Linux:
sudo apt-get install sbt=0.13.13

Install scala on Mac OSX Lion

http://cingusoft.posterous.com/install-scala-on-mac-os-x
I changed .profile and save. after I type
source .profile
at first it works, but after I close terminal and re-opened, It doesn't work.
How do I this problem?
Getting a Scala interpreter to work
I solved on my own.
You should add this line to your shell autoload file: .bashrc for bash or .zshrc for zsh.
Latest MacOS Catalina Scala deployment with Apache Spark and Kafka:
Install Brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Install Java JDK8
brew cask install adoptopenjdk/openjdk/adoptopenjdk8
Install SBT
brew install set
Install Scala (latest 2.13.3)
brew install scala
Install Spark (latest 3.0.0)
brew install apache-spark
Install Kafka (latest 2.5.0)
brew install kafka
Etc. for Cassandra
brew install cassandra ...
Latest Ubuntu 20.04 "One-Click" deployment:
curl -Lo cs https://git.io/coursier-cli-linux && chmod +x cs && ./cs setup