Ubuntu mounted on mysql + navicat Full Record (+ pip3 installed)

surroundings

vmware15+ubuntu16.04

aims

Sql built environment in ubuntu, and to achieve interaction with the python code

step

The following major follow several blog posts, concrete steps are not described in detail, recorded some important points.

https://www.linuxidc.com/Linux/2018-05/152413.htm

https://www.cnblogs.com/tanrong/p/10173109.html

There are several questions:

1. After installing navicat, open all small block navicat

1 ) The start_navicat files in the installation directory to make changes 
soon LANG Export = " en_US.UTF-8 " instead LANG = Export " zh_CN.UTF-8 " 
2 ) open navicat, menu bar, select Tools - Options 
to " General "  " editor "  ," record " three options in font settings, select Noto Sans mono CJK SC Regular / drop-down box to the right AR PL uMing CN. These three parts are set this font
 3 ) If the experience of the second step, there is still found in the menu bar box, then restart the virtual machine, it can open again shows complete

Beacon about the location options, because sometimes it might open a box of all.

 

 2. extend the trial period of navicat

Delete .navicat64 / hidden files, you can run again 
in the user's home directory, generate hidden folder, ll see the hidden files related to specific Jiaosha, as some called. / Navicat 
after finding directly RM .navicat64 / -r you can delete the

 

3. There is a pit of installation pip. . . Before I basically did not record each time had to re-install ubuntu against all Bowen installed a long time to explore. . . .

To distinguish between first and pip pip3, pip3 the corresponding python3-pip. I'm here to pip3 as the installation target, in fact, the process is similar.

Because after a successful installation, I use pip3 install another python file, always will complain

TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
You are using pip version 8.1.1, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

I used it include the proposed ' PIP PIP --upgrade install ' command, also reported the mistake.

So the only way to pro-test and effective way I can think of is to specify the source of the installation. as follows:

// install 
LY @ Ubuntu: ~ $ sudo -i PIP3 install HTTPS: // pypi.tuna.tsinghua.edu.cn/simple PIP -U 
this time by PIP3 - Version
 // error 
ly @ ubuntu: ~ $ pip3 - - Version 
Traceback (MOST recent Results Call Last): 
  File " / usr / bin / PIP3 " , Line 9 , in <Module>
     from PIP Import main 
ImportError: CAN not Import name ' main ' 
// resolve the error 
ly @ ubuntu: ~ $ sudo the gedit / usr / bin / to python3 
the corresponding portions of the document read 
from PIP Import __main__
 IF the __name__ ==' __Main__ ' : 
    the sys.exit (main __._ __ main ()) 

// normal display 
LY Ubuntu @: ~ $ PIP3 - Version 
PIP 19.3 . . 1  from . / Usr / local / lib / to python3 . 5 / dist-Packages / PIP (Python 3.5 )

 4. Use pip3 to install python library, the following bug, for example to pymysql

ly@ubuntu:~$ sudo pip3 install pymysql
[sudo] password for ly: 
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7723c821d0>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pymysql/
ERROR: Could not find a version that satisfies the requirement pymysql (from versions: none)
ERROR: No matching distribution found for pymysql

By looking at someone else's blog, this might be found and pip3 time before the same problem, because the installation is to provide a source of instability or pip image is not available.

Currently available mirror source are:

Use way: it writes the configuration file to go

ly@ubuntu:~$ mkdir ~/.pip
ly@ubuntu:~$ 
ly@ubuntu:~$ cd .pip
ly@ubuntu:~/.pip$ sudo gedit pip.conf //增加配置文件
ly@ubuntu:~/.pip$ sudo pip3 install pymysql
WARNING: The directory '/home/ly/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
WARNING: The directory '/home/ly/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Collecting pymysql
  Downloading http://mirrors.aliyun.com/pypi/packages/ed/39/15045ae46f2a123019aa968dfcba0396c161c20f855f11dea6796bcaae95/PyMySQL-0.9.3-py2.py3-none-any.whl (47kB)
     |████████████████████████████████| 51kB 491kB/s 
Installing collected packages: pymysql
Successfully installed pymysql-0.9.3

pip.conf profile contents

[global]

trusted-host=mirrors.aliyun.com

index-url=http://mirrors.aliyun.com/pypi/simple/

ok completed.

 

 

 

Guess you like

Origin www.cnblogs.com/lyeeer/p/11921893.html