My blog development (030)-for answers, help, deployment stuck can not be solved ... 555 ...

Posted May 25, 20204 min read

What is a server:
You can use Alibaba Cloud server,

More-reset password-restart

Connect to the server:use get bash

Open get bash

Execution instruction:use public network ip

ssh root @ ip

Enter our reset password:
Start preparation work:

Installation related environment:

See which python versions are available:python + tab
It is best to use and develop the same version:python3.8

Because linux is used, apt-get is used here

apt-get install software-properties-common

Plus as python3.8 version:

add-apt-repository ppa:jonathonf/python-3.8

There is a problem here:
Because the above software-properties-common is not installed, go back and see that the installation failed, let's update apt-get and try to find it successful, reference address
Reason analysis and solution:It took me 20 hours to solve this problem:in the end it was also unsatisfactory;

Problem Description:

There are problems when using Alibaba Cloud to configure the environment. I checked various methods online and it is still difficult to solve. I used python3.8, enter:add-apt-repository ppa:jonathonf/python-3.8 and then enter apt-get update The problem:
Because ppa:jonathonf is only for Python3.6, and ppa:deadsnakes/ppa is only for 3.7, and in 2020 it seems that ppa can't connect, the website has problems, and then someone said to download a tga package from the Internet and import it into the cloud server , And then unzip the installation, I tried it, the import process is very painful, it is difficult to use the get bash method to come out of the file selection dialog box, I replaced the xshell, this can be, but after importing to check the problem, I changed the FileZilla again The software connects to the server and imports it. After installing the python3.8 package, the soft connection cannot be found. It may be because I tried too much and completely messed up. I chose to initialize the server and upgrade the server. Taobao consulted other programmers and they said this Installation is easy to go wrong, then you can try anaconda, the default is Python3.7, after installing the soft link, mmp succeeded

Reference address:

Here also just install Python3.7 and need to install other content:
Install Pip:
pip -V shows pip pointing to python2.7
pip2 also points to python2.7
Run apt-get install python3-pip
At this point pip3 is pointing to python3.7
apt remove pyton3-pip can delete
Not the latest, you can upgrade it:
pip3 install --upgrade pip

Install the virtual environment:
pip3 install virtualenv
Another bug:

subprocess.CalledProcessError:Command ‘(‘ lsb_release ’,‘ -a ’)’ returned non-zero exit status 1.
find/-name lsb_release
rm -rf/usr/bin/lsb_release

Reinstall the virtual environment:successful
Create a virtual environment mysite \ _env:
Virtualenv mysite \ _env
A bug appeared:

Traceback(most recent call last):
File "/usr/lib/command-not-found", line 27, in <module>
From CommandNotFound.util import crash_guard
ModuleNotFoundError:No module named 'CommandNotFound'

Some people say that it is caused by the modification of the soft connection , I do n’t quite believe, how can the soft connection be unchangeable after all? !

Someone said that the module was not provided with python3 , it is very possible, try, change and find that more bugs have appeared!

Found more bugs!

This bug here really makes me uncomfortable, wait a while to come back to do it! Unfortunately, my Alibaba Cloud trial for a month

Can you help the younger brother? ?