Nic*_*our 2 python pip matplotlib pandas anaconda
Windows 10 Python 3.1
我编写了一个需要 pandas 和 matplotlib 的脚本。但是,即使我尝试了 cmd 中的 pip 和 Miniconda 中的 conda,我在安装时也遇到了问题。
这是我在 cmd 中尝试通过 pip 安装时遇到的错误(即py -m pip install -U matplotlib
:
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Nick\miniconda3\envs\name_of_my_env\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Nick\\AppData\\Local\\Temp\\pip-install-jlytfo2_\\matplotlib_5bffd16903a8431f98af43098502973c\\setup.py'"'"'; __file__='"'"'C:\\Users\\Nick\\AppData\\Local\\Temp\\pip-install-jlytfo2_\\matplotlib_5bffd16903a8431f98af43098502973c\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Nick\AppData\Local\Temp\pip-wheel-3tmzcurv'
cwd: C:\Users\Nick\AppData\Local\Temp\pip-install-jlytfo2_\matplotlib_5bffd16903a8431f98af43098502973c\
Complete output (551 lines):
Run Code Online (Sandbox Code Playgroud)
在 conda 中,当我尝试时conda install matplotlib
,我得到这个:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- python=3.1
Current channels:
- https://conda.anaconda.org/conda-forge/win-64
- https://conda.anaconda.org/conda-forge/noarch
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/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.
Run Code Online (Sandbox Code Playgroud)
我真的不确定可能出了什么问题,因为当我在另一台电脑上通过类似方式安装这些软件包时,我没有遇到这些问题,而且我确实安装了 Python 3.1。任何帮助将不胜感激,谢谢!
创建并激活 python 3.10 环境后,您基本上无法安装任何东西。您甚至无法安装 conda-build:
conda install conda-build -y
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
ResolvePackageNotFound:
- python=3.1
Run Code Online (Sandbox Code Playgroud)
Conda 4.10 包含 python 3.9 , conda 4.11 包含 python 3.10,因此您的基础环境应该与其中的 python 版本兼容。
如果您需要 python 3.10 或更高版本,则必须有 conda 4.11 或更高版本。安装所需的 conda 版本,或切换到基础环境并使用更新 condaconda update conda
。
安装另一个包含 python 3.9 或更早版本的环境conda create --name py39 python=3.9
并激活它。
归档时间: |
|
查看次数: |
1786 次 |
最近记录: |