Python deep learning solves error reporting problems encountered 5

Table of contents

1. Conda installation shapefile failed

二、conda安装osmnx失败:To search for alternate channels that may provide the conda package you'relooking for, navigate to

三、ERROR: Could not build wheels for llvmlite, which is required to install pyproject.toml-based projects

四、bash: pip: command not found

解决报错:ERROR: Could not find a version that satisfies the requirement pip<21.0 (from versions: none)

解决报错:Exception: HTTPSConnectionPool(host='mirrors.tuna.tsinghua.edu.cn', port=443): Max retries exceeded with url: /anaconda/pkgs/free/linux-64/current_repodata.json (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: EE certificate key too weak (_ssl.c:1002)'))

5. Reinstall miniconda3 on linux

5.1 Uninstall the old one

5.2 Install new

Six pip install osgeo failed


1. Conda installation shapefile failed

Error reported:

Question : Maybe it's my problem with the ladder, just turn it off.

Solution : Turn off the VPN first! Enter the following command in the command line window to check whether the .condarc file exists:

conda config --show-sources

If the information shown in the figure below is output and the following code appears, it means that the .condarc file description is automatically generated in the root directory and the condarc file already exists:

If this file was generated, delete this file.

rm -rf ~/.condarc

Then, try reinstalling geopandas,

conda install geopandas

Use conda to check and find that the installation was successful.

conda list  

二、conda安装osmnx失败:To search for alternate channels that may provide the conda package you're
looking for, navigate to

Error reported:

To search for alternate channels that may provide the conda package you're
looking for, navigate to

Solution: It used to be >> conda  install package, use >> pip install package instead.

 Use conda to check and find that the installation was successful.

conda list  

The installation was successful.

三、ERROR: Could not build wheels for llvmlite, which is required to install pyproject.toml-based projects

Error reported :

pip install llvmlite==0.32.1

Solution : Manually install the pythoncorresponding files of the next version ..whl

Download address: PyPI · The Python Package Index

Search for the package name (just search for the module you want to install),

Find the corresponding version and click download. 

I found that the reason why I failed to install the package before was because my python3.9 version did not correspond. After trying again, I found that the installation was successful.

四、bash: pip: command not found

Error: pip not found command

Reason: The original possibility is that pip is not installed, or the pip file is damaged and pip cannot be used.

Solution:

(1) Check the corresponding version of your own python and execute  python --version  to check. My version here is python 2.7.12.

(2) Create a new get-pip.py file and copy the pip content into it. There is a lot of content. The link is as follows:
https://bootstrap.pypa.io/pip/2.7/get-pip.py
The content is as shown below:

Select and copy all the contents in the link to the newly created get-pip.py file, save and exit.

(3) Execute  the python get-pip.py  command to install, download and install pip.

No success.

解决报错:ERROR: Could not find a version that satisfies the requirement pip<21.0 (from versions: none)

Error reported:

reason:

Solution:

解决报错:Exception: HTTPSConnectionPool(host='mirrors.tuna.tsinghua.edu.cn', port=443): Max retries exceeded with url: /anaconda/pkgs/free/linux-64/current_repodata.json (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: EE certificate key too weak (_ssl.c:1002)'))

Error: After I set up the domestic source, I used conda to create a virtual environment, and the following error occurred when downloading the python version.

Reason: This is due to the lack of ssl dependency package. The online solution is that yum install openssl-devel since the Debian system does not have yum, using apt-get to install it can only solve the pip installation problem corresponding to the python2 that comes with the system, but cannot solve the pip3 installation of python3. question.

Solution: When compiling, you need to add the parameter --with-ssl and re-execute make and make install.

5. Reinstall miniconda3 on linux

5.1 Uninstall the old one

This step is relatively simple. Find the path where miniconda exists and delete the entire miniconda file directly.

5.2 Install new

(1) Find the download address of miniconda and find the version you want to install.

Download address: Index of /anaconda/miniconda/ | Tsinghua University Open Source Software Mirror Station | Tsinghua Open Source Mirror

Download and upload to the server.

(2) Use the following command to install miniconda and enter the following command,

bash Miniconda3-py39_23.3.1-0-Linux-x86_64.sh

You must select yes during the entire installation process. The default for a certain step in the middle (conda initialization) is no, so you must select yes. During the process, a simple operation is required:  press enter ---- 3 spaces - enter yes - press enter - enter yes - activate the configuration

After installation, enter bash to switch to the base environment.

bash

Six pip install osgeo failed

Error reported:

Therefore, I used pip install osgeo to install the osgeo third-party library, but the installation failed, as shown in the following figure: 

Reason: This problem is usually caused by the inconsistency between the python version and the GDAL installation package.

Solution:

(1) We can win+ropen the cmd window and enter the command:

pip debug --verbose

You can see that there are so many supported versions. You need to choose a suitable version.

(2) Enter the official extension package download website to look for the version-adaptive whl file, and look for the version-adapted whl file.

  • cpxxx represents the cpython version;
  • You need to select the cp (python version) that corresponds to the version of your python interpreter. For example, my python version is 3.9, just select the version corresponding to cp39;
  • Although the CPU is from Intel, you need to choose to download amd64 to pip normally (because using "AMD64" or "amd64" refers to both AMD64 and Intel64);

Here I take GDAL‑3.4.3‑cp39‑cp39‑win_amd64.whl as an example,

After downloading, you need to put this file in the path corresponding to the python3.9 version, that is, move it to the Scripts directory in the python download directory.

  • For example, my path is: D:\my\python-pycharm\python-envs\pathplanning\Scripts

Then open the cmd window under the current path and enter the command,

  • The file name here needs to be replaced with the file name of your own version
  • Note: If it is a conda environment, you need to start the conda virtual environment before downloading
pip install GDAL‑3.4.3‑cp39‑cp39‑win_amd64.whl

If you see the following prompt, it means the installation is successful.

If the is not a supported wheel on this platform error is reported, it means that the python version and the GDAL version are inconsistent.

Found that relevant files appeared in the folder.

Return to pycharm to write from osgeo import gdal,或者and reopen the file that needs to be imported into osgeo. No error is reported, indicating that the installation is successful.

Guess you like

Origin blog.csdn.net/qq_45956730/article/details/132780088