Installing Apache Superset on Windows Server 2019, and connecting Superset with MSSQL - apache-superset

How Apache Superset can be installed on Windows Server 2019? What are the steps and commands to use for installing this?

First, you need to enable Linux on Windows Server 2019. Follow the steps mentioned here:
https://learn.microsoft.com/en-us/windows/wsl/install-manual
Besides this, you also might need to have Microsoft Build Tools for Visual Studio installed on your windows computer. You may install it following the steps here:
https://www.scivision.co/python-windows-visual-c++-14-required/
Once you have both these, run the following commands in the Linux terminal mentioned here to installing Apache Superset:
source: https://superset.apache.org/docs/installation/installing-superset-from-scratch
sudo apt-get install build-essential libssl-dev libffi-dev python3-dev python3-pip libsasl2-dev libldap2-dev
python3 -m pip install virtualenv
python3 -m venv superset
. superset/bin/activate
python3 -m pip install apache-superset
superset db upgrade
#after running above command if you get dataclass module missing error: run the following command, and then give the above command again:
pip install dataclasses
export FLASK_APP=superset
superset fab create-admin
#provide credentials
superset load_examples
superset init
superset run -p 8088 --with-threads --reload --debugger
Now you should be able to access apache superset at:
http://127.0.0.1:8088/login/
If you want to connect apache superset with MSSQL database, then you need to follow the steps mentioned here to install ODBC driver first:
https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15

Related

How to install apache superset in the secured servers(Without internet)

What is the best way of installing the apache superset in the secured server?
I haven't found any answer for it i figured it out with so many trial and error method, So its my small contribution to the community who are facing same issue
Below are the commands to install apache superset in production/Development
sudo yum install gcc gcc-c++ libffi-devel python-devel python-pip python-wheel openssl-devel cyrus-sasl-devel openldap-devel
sudo yum install python3
sudo yum install python3-devel
Since server has no internet you need to download it from below python community in your local system and transfer it to the server
Download all dependencies from :- https://pypi.org/simple/
To untar :- tar -xvf package.tar
Go to untared folder and run below command
sudo python3.x setup.py install x=your python version
If the package is of wheel extension i.e .whl run below command
sudo python3.6 -m pip install packagename.whl
After installing all the dependencies run below command
fabmanager create-admin --app superset
superset db upgrade
superset init
superset run -p port --with-threads --reload --debugger - For development
gunicorn -b IP:port superset:app --For production use
Hope this will help someone who is facing issue,
If there is any changes or i missed please add

how to install pip remotely using ssh

Hi I hope someone can point me in the right direction.
I am trying to upload a django project which I have developed locally on my machine and now moved the project files to a server and am trying to install django on the server.
I have Python 2.7.5 installed and accessed the server remotely using ssh (putty) I can confirm Python is installed by running the command python --version
I don't have pip installed as when i run the command pip --version
I get following notification
-bash: pip: command not found
I am new to django and python so not sure what I should do to install both django and pip.
p.s In my requirements file and when working locally I have pip and django installed correctly and all working.
Ok, lets say you are already on your remote server. First thing to do is to install pip for your version of python. You can do this via:
sudo apt-get install python-pip
From now you have pip installed. Next thing to do is to install django globally in your system:
pip install django==1.11
Please note that django 1.11 is the last version that supports
python2
Next thing to do is to create django app:
django-admin startproject test_project
And the last thing is to install virtualenv
To install libraries for each of your django projects and keep them
separate
pip install virtualenv
Also note
If you have requirements.txt file with all libs, you can do something like this on your remote server:
pip install -r requirements.txt
That will automatically install all libraries at once
First you should understand which OS you're running:
uname -a
and:
lsb_release -a
When you find the OS version, you can easily follow this guide:
https://packaging.python.org/guides/installing-using-linux-tools/#installing-pip-setuptools-wheel-with-linux-package-managers

google cloud compute engine change to python 3.6

I am a running a python script where I train CNN on my laptop and now want to run it on google cloud. The script imports tensorflow and keras, for which I need Python 3.6
The steps I followed were:
Go to compute engine and create a virtual machine with 8cpus
I ssh into the virtual machine, and I see that the python version is 2.7
How can I change the python version to 3.6 so I can install keras, and then to be able to run my python script?
Many thanks for your help
I had the same problem. By preference, I cd'ed into /tmp: cd /tmp, but from there, I followed these steps in the VM terminal:
wget https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tgz
tar -xvf Python-3.6.3.tgz
cd Python-3.6.3
./configure
sudo apt-get install zlib1g-dev
sudo make
sudo make install
python3 -V
If it works, the last one should print out:
Python 3.6.3
If it doesn't work, then you have something different about your environment that is preventing it. This is starting from a clean VM environment. But hopefully this works out for you!
You can install it by using:
sudo apt-get -y -qq install python3
Check this using:
python3 --version

How to make changes in Airbnb Superset?

I deployed Superset on Ubuntu 14.04 from the source code and it works fine. Now I want to play with the superset code to make required changes. Like adding the Png downloadable option for charts.I made changes but it didn't reflect Superset build. How to make changes in Superset code that should reflect Superset on browser?
code Build Process:
git clone https://github.com/airbnb/superset
cd ${SUPERSET_HOME}/superset/assets
npm install : Will install the npm dependencies
pip install virtualenv : Will install virtualenv
virtualenv venv : Set virtualenv
. ./venv/bin/activate : activate virtualenv
pip install --upgrade setuptools pip : Will upgrade
npm run prod : Set NODE_ENV variable and run dependencies
cd ${SUPERSET_HOME}
python setup.py install
//Create an admin user :
fabmanager create-admin --app superset
//Initialize the database :
superset db upgrade
//Load some data to play with :
superset load_examples
//Create default roles and permissions :
superset init
//To start the server : superset runserver -p 9002
You can read all the details here: https://github.com/airbnb/superset/blob/master/CONTRIBUTING.md#setting-up-a-python-development-environment
The main idea is to install for development using:
python setup.py develop
And run dev server:
superset runserver -d

Turn an Anaconda Python installation into a conda environment to be able to switch between different versions?

I need to use both Python 2.7, and 3.5. Ideally, I should use conda to create an alternative environment, but after using
bash Anaconda2-4.2.0-Linux-x86_64.sh
to install python 2.7, in a few minutes after downloading the shell script, then with
conda create -n py35 python=3.5 anaconda
always failed due to download time out, after more than dozen minutes of downloading numerous packages. (I'm in China, behind GFW.)
But I have no problem to install python 3.5 in a few minutes after downloading the shell script, by
bash Anaconda3-4.2.0-Linux-x86_64.sh
so I wonder if it's possible to manually turn the python 3.5 installation into a conda managed environment so that I can switch between them?
Thanks a lot for your help!
set up shadowsocks client and proxchains4, I just set up an ubuntu server .
step1:
buying or setting up a shadowsocks server
step2:
install shadowsocks client
pip install shadowsocks
step3:
install proxychains
sudo apt-get install proxychains
step4: setup and run setup
shadow socks client tutorial and
proxychains tutorial
step5:
you can use proxychains to create new env
proxychains conda create -n py35 python=3.5