Failed to download dependencies in pycharm, try these two methods

Problem Description:

insert image description here
Usually when using python, there are often problems with relying on downloading, and
automatic installation using pycharm fails:
try the following two methods:

are run in the terminal

1. If you are using the python version environment

Install using pip : Enter on the command line or terminal

pip install  xxx

If the network is good, the package may be downloaded and installed directly. If the download speed is slow or even cannot be downloaded, you can consider switching the pip source to a domestic mirror, such as the Alibaba Cloud source:

pip install -i https://mirrors.aliyun.com/pypi/simple/ xxx

2. If you are using the Anaconda environment

Install using conda: If you are using Anaconda or Miniconda as the Python environment manager, you can run it on the command line or terminal

conda install xxx

command to install the package. Same as pip, you can also switch the conda source to a domestic mirror to increase the download speed.

Guess you like

Origin blog.csdn.net/weixin_54174102/article/details/131269317