How to switch between Python 3 versions Python 3 11 and 3 8 as default python 3 8 in linux
Disini bisa paham cara switch between Python 3 versions Python 3 11 and 3 8 as default python 3 8 in linux
Update & upgrade
sudo apt update
sudo apt -y full-upgrade
reboot
Login user in mate desktop then The root Account in ubuntu mate is disabled by default because his password is not set
sudo -s
sudo passwd root
Install SSH Server
sudo apt-get install openssh-server
How to enable ssh root access
sudo nano /etc/ssh/sshd_config
change
PermitRootLogin prohibit-password
to
PermitRootLogin yes
sudo service ssh restart
sudo systemctl enable ssh
reboot
# I rebooted system after install
Install Google Chrome
Method 1: Download and install the Google Chrome Debian package
Step 1: Download Google Chrome
- Visit the official Google Chrome download page.
- Click the "Download Chrome" button.
- Choose the "64 bit.deb (for Debian/Ubuntu)" option.
- Click "Accept and install".
Save the .deb file to your preferred location, usually the Downloads folder.
Alternatively, you can also download the latest Google Chrome Debian package via the following command:
cd ~/Downloads
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
Open a terminal by pressing Ctrl + Alt + T.
Navigate to the location where you saved the.deb file, typically with the command:
cd ~/Downloads
Install the package using the following command:
sudo dpkg -i google-chrome-stable_current_amd64.deb
In case you encounter dependency issues, fix them using:
sudo apt-get install -f
google-chrome –version
Running Google Chrome desktop
If popup keyring enabled you must fix them.
Fix keyring use 100% CPU usage when Google Chrome started
Login putty by user root, make simple copy to terminal
sed -i 's/Exec=\/usr\/bin\/google-chrome-stable %U$/Exec=\/usr\/bin\/google-chrome-stable %U --password-store=basic/g' /usr/share/applications/google-chrome.desktop
sed -i 's/Exec=\/usr\/bin\/google-chrome-stable$/Exec=\/usr\/bin\/google-chrome-stable --password-store=basic/g' /usr/share/applications/google-chrome.desktop
Running google chrome by ubuntu mate desktop again
INSTALL YouTube-Viewer DEFAULT by mshawon
Support Python 3.7.x - 3.10.12
Login putty by user
To list all python versions in default locations
ls /usr/bin/python*
goo
Install git
sudo apt install git
install pip
sudo apt install pip
cd /tmp
git clone https://github.com/MShawon/YouTube-Viewer.git --depth 10
cd YouTube-Viewer
python3 -m pip install --upgrade pip wheel
pip3 install "setuptools<59"
pip3 install -r requirements.txt
cd ..
sudo mv YouTube-Viewer/ /usr/local/.
cd /usr/local/YouTube-Viewer
FIX Run chromedrvier 115 got error "chromedriver' executable -> sessionnotcreatedexception
check chrome
google-chrome –version
if google chrome version 118 you must have chromedriver = 118
then download chromedriver, minimal same version with your chrome
https://googlechromelabs.github.io/chrome-for-testing/#stable
extract and upload to main dir/work dir
by winscp set directory permission with current user set 0777
sudo chmod +x /usr/local/botweb/chromedriver
run your program again
FIX GET SWITCHING Python 3.11 and 3.8
Login BY ROOT with putty
To list all python versions in default locations
ls /usr/bin/python*
python3 --version
Prerequisites:
Install [and or update] the following packages; build-essential, checkinstall, libreadline-gplv2-dev, libncursesw5-dev, libssl-dev, libsqlite3-dev, tk-dev, libgdbm-dev, libc6-dev, libbz2-dev, libffi-dev, zlib1g-dev.
apt install build-essential checkinstall
apt-get install libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev
Thereafter, change directory (cd) to your opt folder [or any convenient folder] and download the python source code from python's server:
First change directory (cd) to the 'opt' folder:
cd /opt/
Download the source code
wget https://www.python.org/ftp/python/3.8.3/Python-3.8.3.tgz
Extract the [downloaded] source code files
tar xzf Python-3.8.3.tgz
Change directory (cd) the Python Folder [created after the extraction]
cd Python-3.8.3
Compile the source code
./configure --enable-optimizations
then
make altinstall
Once the compilation is completed, you can confirm that Python 3.8 has been installed successfully with:
python3.8 -V
You should see the response Python-3.8.3.
To list all python versions in default locations
ls /usr/bin/python*
python3 --version
To list all python versions in default locations
ls /usr/local/bin/python*
python3.8 -V
update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.8 3
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 4
update-alternatives --list python3
update-alternatives --config python3
set to python 3.8.3
check if set python 3.8.3 is default
update-alternatives --config python3
reboot
INSTALL YOUTUBE VIEWER MSHAWON
Install git
sudo apt install git
install pip
sudo apt install pip
git clone https://github.com/MShawon/YouTube-Viewer.git --depth 10
python3 -m pip install --user --upgrade pip wheel
pip3 install –user "setuptools<59"
pip install --user -r requirements.txt
If you've got a large free proxies collection, you should run this command to filter Good proxies. Then use GoodProxy.txt for proxy in youtube_viewer.py
Urls
Put video links in the urls.txt. For multiple videos place urls in multple lines.
To find video link in YouTube click share and copy.
If you have any external link which will redirect to your youtube video you can use that too. Example : when you post a YouTube video link in twitter and you hit play on twitter, you will get a link like this https://t.co/xxxxxxxxxx?amp=1. This is helpful because YouTube will see that views are coming from External Source like twitter in this example.
Search
Program can search youtube with the keyword you want and find the video with video title or video id. To do this you need to know what keyword can find your video on youtube search engine. Also you need to provide exact video title or video id. Put keyword and title like this format keyword :::: video title or keyword :::: video id in search.txt. Always use multiple keyword for the same video title or video id.
If you don't know any keyword just put your video title :::: video title or video title :::: video id in search.txt
FIX Run chromedrvier 115 got error "chromedriver' executable -> sessionnotcreatedexception
check chrome
google-chrome –version
if google chrome version 118 you must have chromedriver = 118
then download chromedriver, minimal same version with your chrome
https://googlechromelabs.github.io/chrome-for-testing/#stable
extract and upload to main dir/work dir
by winscp set directory permission with current user set 0777
sudo chmod +x /usr/local/botweb/chromedriver
run your program again
What's Your Reaction?






