Python: 在 anaconda 3 (python 3.6) 解释器的 pycharm 中安装 investpy

Python: install investpy in pycharm on anaconda 3 (python 3.6) interpreter

根据我的问题,我想使用解释器 anaconda (python 3.6) 将软件包 investpy 安装到 pycharm 中。由于某种原因,安装本身是不可能的,pycharm 本身向我显示错误:

error:

Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.


PackagesNotFoundError: The following packages are not available from current channels:

  - investpy

Current channels:

  - https://repo.anaconda.com/pkgs/main/linux-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/linux-64
  - https://repo.anaconda.com/pkgs/r/noarch

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

    https://anaconda.org

and use the search bar at the top of the page.

通过 anaconda 使用推荐的方式 website 我通过 pip 命令安装了它。但是包已经存在:

pip install -i https://pypi.anaconda.org/alvarob96/simple investpy

安装消息:

Looking in indexes: https://pypi.anaconda.org/alvarob96/simple
Requirement already satisfied: investpy in ./Downloads/yes/lib/python3.8/site-packages (1.0.7)
Requirement already satisfied: pandas>=0.25.1 in ./Downloads/yes/lib/python3.8/site-packages (from investpy) (1.2.4)
Requirement already satisfied: lxml>=4.4.1 in ./Downloads/yes/lib/python3.8/site-packages (from investpy) (4.6.3)
Requirement already satisfied: pytz>=2019.3 in ./Downloads/yes/lib/python3.8/site-packages (from investpy) (2021.1)
Requirement already satisfied: numpy>=1.21.2 in ./Downloads/yes/lib/python3.8/site-packages (from investpy) (1.21.4)
Requirement already satisfied: Unidecode>=1.1.1 in ./Downloads/yes/lib/python3.8/site-packages (from investpy) (1.3.2)
Requirement already satisfied: setuptools>=41.2.0 in ./Downloads/yes/lib/python3.8/site-packages (from investpy) (52.0.0.post20210125)
Requirement already satisfied: requests>=2.22.0 in ./Downloads/yes/lib/python3.8/site-packages (from investpy) (2.25.1)
Requirement already satisfied: python-dateutil>=2.7.3 in ./Downloads/yes/lib/python3.8/site-packages (from pandas>=0.25.1->investpy) (2.8.1)
Requirement already satisfied: idna<3,>=2.5 in ./Downloads/yes/lib/python3.8/site-packages (from requests>=2.22.0->investpy) (2.10)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in ./Downloads/yes/lib/python3.8/site-packages (from requests>=2.22.0->investpy) (1.26.4)
Requirement already satisfied: certifi>=2017.4.17 in ./Downloads/yes/lib/python3.8/site-packages (from requests>=2.22.0->investpy) (2020.12.5)
Requirement already satisfied: chardet<5,>=3.0.2 in ./Downloads/yes/lib/python3.8/site-packages (from requests>=2.22.0->investpy) (4.0.0)
Requirement already satisfied: six>=1.5 in ./Downloads/yes/lib/python3.8/site-packages (from python-dateutil>=2.7.3->pandas>=0.25.1->investpy) (1.15.0)

在 anaconda 解释器中它仍然不可用:

有没有办法用 pycharm 安装软件包?

我这样做解决了这个问题:

pip uninstall investpy

然后使用PyCharm安装它: