This is python3 installed using scl tool.
And I am permanently using python3 by adding "source scl_source enable rh-python36" to /etc/profile.
vim version => vim8
linux = CentOS7
How can I enable'-python3'?
Or do I need to install python3 again?
Related
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
i'm installing pgadmin4 in Mint 19, following this instructions:
https://linuxhint.com/install-pgadmin4-ubuntu/
When i come to run:
https://linuxhint.com/install-pgadmin4-ubuntu/
I have an error:
File "/home/nico/pgadamin4/pgAdmin4/local/lib/python2.7/site-packages/alembic/util/__init__.py", line 31, in <module>
raise CommandError("SQLAlchemy 1.1.0 or greater is required. ")
alembic.util.exc.CommandError: SQLAlchemy 1.1.0 or greater is required
at this point, i don't know how to proceed. I don't really understand the whole installing process, using the virtual environment, so i can't add more information. Anyone can help? Thanks!
Why are you doing it manually?
pgAdmin4 now comes as native linux package.
Goto postgres site, Select your Ubuntu version as "Ubuntu Bionic" (which your Linux mint is based on).
https://www.postgresql.org/download/linux/ubuntu/
Add postgres repo as show on above link, and then do
sudo apt-get update && sudo apt-get install pgadmin4
For pgAdmin 4 v4.21 on Ubuntu, according to the download page:
Install dependencies, create a virtual environment, download, install & configure
Using Python2.x
sudo apt-get install virtualenv python-pip libpq-dev python-dev
cd
virtualenv pgadmin4
cd pgadmin4
source bin/activate
pip install https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v4.21/pip/pgadmin4-4.21-py2.py3-none-any.whl
Using Python3.6 (Preferred to avoid encoding related issues)
sudo apt-get install virtualenv python3-pip libpq-dev python3-dev
cd
virtualenv -p python3 pgadmin4
cd pgadmin4
source bin/activate
pip3 install https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v4.21/pip/pgadmin4-4.21-py2.py3-none-any.whl
Configure
Override default paths and set it to single-user mode in the local configuration file:
nano lib/python2.7/site-packages/pgadmin4/config_local.py
For Python3.x:
nano lib/python3.6/site-packages/pgadmin4/config_local.py
Write:
import os
DATA_DIR = os.path.realpath(os.path.expanduser(u'~/.pgadmin/'))
LOG_FILE = os.path.join(DATA_DIR, 'pgadmin4.log')
SQLITE_PATH = os.path.join(DATA_DIR, 'pgadmin4.db')
SESSION_DB_PATH = os.path.join(DATA_DIR, 'sessions')
STORAGE_DIR = os.path.join(DATA_DIR, 'storage')
SERVER_MODE = False
Run
python lib/python2.7/site-packages/pgadmin4/pgAdmin4.py
For Python3.x:
python3 lib/python3.6/site-packages/pgadmin4/pgAdmin4.py
Access
Access at http://localhost:5050
Exit
Exit with Ctrl-C
Run again
cd ~/pgadmin4
source bin/activate
python lib/python2.7/site-packages/pgadmin4/pgAdmin4.py
For Python3.6
#!/bin/bash
cd ~/pgadmin4
source bin/activate
python3 lib/python3.6/site-packages/pgadmin4/pgAdmin4.py
Make a shortcut
touch ~/pgadmin4/pgadmin4
chmod +x ~/pgadmin4/pgadmin4
nano ~/pgadmin4/pgadmin4
Write:
#!/bin/bash
cd ~/pgadmin4
source bin/activate
python lib/python2.7/site-packages/pgadmin4/pgAdmin4.py
For Python3.6
#!/bin/bash
cd ~/pgadmin4
source bin/activate
python3 lib/python3.6/site-packages/pgadmin4/pgAdmin4.py
Now you can just run it with a simpler command:
~/pgadmin4/pgadmin4
Python3 users
Replace [x] in Python3.6 with your respective version.
Conflict with pgAdmin 3 configuration
pgAdmin 4 will not start in the environment where pgAdmin 3 was previously installed and used because of incompatible configuration in the .pgadmin directory. The simplest solution is to either clear that directory or tweak config_local.py to point to a clean new .pgadmin4 directory.
I am new to the Yocto project on Ubuntu. It requires that python version 2.7 and not 3.X be used. I need to set the default version of Python to 2.7. How do I do this?
write on your Terminal
cd /usr/src
then Install Python from python.org
sudo wget https://www.python.org/ftp/python/2.7.14/Python-2.7.14.tgz
then Unzip The tgz file by writing
sudo tar xzf Python-2.7.14.tgz
then Goto The Directory Python-2.7.14
cd Python-2.7.14
then Configure The Language
sudo ./configure --enable-optimizations
then add Python to your Path
sudo make altinstall
And Done Python 2.7.14(True version and original) installed
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
I'm trying to change default python version to 2.7 in Cloud 9-IDE. I have managed to install correct version with command: nada-nix install python-2.7.4
It installs the version nicely, but default version stays 2.6.6.
$ python --version
Python 2.6.6
I have tried to update symbolic link to the correct version. But it says that I'm not privileged enough.
ln -nsf /usr/bin/python2.7.4 /usr/bin/python
ln: cannot remove `/usr/bin/python': Permission denied
What to do?
The Cloud9 package manager will install the python version 2.7 into ~/.nada-nix-profile/bin/python2.7. This is in your path so you can execute python2.7 from the terminal. If you want to symlink this to python just execute
$ ln -s ~/.nada-nix-profile/bin/python2.7 ~/.nada-nix-profile/bin/python
Afterwards you might have to close and reopen the terminal to activate the new version. Also the run button will then use python 2.7.