pycharm precautions and common operations

The python of this computer has packages in it.

image-20221219005909084

There is no package here:

image-20221219005939582

The python continuation character is: \ is generally used in super long strings

Sometimes the download package fails because the pip version is too high or too low

At the command prompt enter:

#查看pip版本
pip show pip
#升级pip
python -m pip install --upgrade pip
#降级pip,本来是21.3.1
python -m pip install pip==20.2.4

A slow internet connection can also cause the download to fail:

Make it lag detection longer using the following command

pip --default-timeout=1000 install -U module name

例:
pip --default-timeout=1000 install -U matplotlib

It may be slow to download some external libraries, you can use the following method:

Mirror website of Tsinghua University: It will greatly speed up the download speed! !

pip install package name -i https://pypi.tuna.tsinghua.edu.cn/simple

Example: pip install gensim -i https://pypi.tuna.tsinghua.edu.cn/simple

pip install jieba -i https://pypi.tuna.tsinghua.edu.cn/simple

pip install sklearn -i https://pypi.tuna.tsinghua.edu.cn/simple

pip install gensim -i https://pypi.tuna.tsinghua.edu.cn/simple

pip install torch -i https://pypi.tuna.tsinghua.edu.cn/simple

pip install json -i https://pypi.tuna.tsinghua.edu.cn/simple

pip install nltk -i https://pypi.tuna.tsinghua.edu.cn/simple

pip install simhash -i https://pypi.tuna.tsinghua.edu.cn/simple

pip install xgboost -i https://pypi.tuna.tsinghua.edu.cn/simple

Select USTC mirror installation:

pip install stanfordcorenlp -i http://pypi.mirrors.ustc.edu.cn/simple/ --trusted-host pypi.mirrors.ustc.edu.cn

Folder colors can be modified here:

image-20220121175230202

Unhighlight, underline tilde:

image-20220121180959064

Set up your own code template:

image-20220121181054617

The setting method of canceling the shift out of the global search twice:

pycharm version/idea version: Chinese version, English version, enter registry Chinese version input
in the global search
register! ! !
The effect of the two is the same, but the input content is different depending on the version, registry=registration,
find ide.suppress.double.click.handler , √, and then close
ps: Some Chinese versions are Chinese, and some are not.

After selection, Ctrl+R means to replace:

image-20220123140333165

Ctrl+F: search code

The venv folder is only available when a virtual environment is created

Guess you like

Origin blog.csdn.net/m0_58768224/article/details/130036720