我以Python 2.7为根.我需要在Python 3.6中安装软件包"statistics",并且它不在anaconda navigator的环境中.对于辅助Python环境,如何使用conda或pip安装统计信息"?
I have Python 2.7 as root. I need to install the package "statistics" in Python 3.6, and it is not in the environments of anaconda navigator. How can install "statistics" with conda or pip for a secondary Python environment?
推荐答案通过运行以下命令创建新的Python 3环境:
Create a new Python 3 environment by running:
conda create --name python3 python=3如果要默认安装所有标准anaconda软件包,请执行以下操作:
If you want all the standard anaconda packages installed by default, do:
conda create --name python3 python=3 anaconda每当需要使用python3时运行:
activate python3然后照常使用命令行.因此,如果要在python3环境中安装某些软件,请确保先activate python3.
Then use the command line as normal. So, if you want to install something into your python3 environment, make sure you activate python3 first.
请注意,python 3 具有自己的统计模块,您可能会发现它有用,并且如果您愿意,该模块已移植到python 2 .
Note that python 3 has it's own statistics module that you may find useful, and this module has been ported to python 2 if you would prefer.
更多推荐
如何在Anaconda中为不同的Python版本安装软件包?
发布评论