这种改变 conda 环境的绝妙方法会在以后破坏某些东西吗?
所以我没有耐心阅读和消化所有关于不断变化的 conda 环境的胡言乱语。(我什至不确定我对“环境”一词的使用是否正确)。
我试图安装 py2exe (pip install py2exe),但出现错误,在回溯中我注意到 pip 正在使用位于 E:\Anaconda 的旧 2.7 anaconda python。我的“新”或当前 3.4 anaconda python 位于 E:\Anaconda3...
所以我所做的是使用 Windows 资源管理器将我的 E:\Anaconda 文件夹重命名为 E:\poopAnaconda(右键单击、重命名等;使用 win7 64)。然后在 cmd 提示符下我输入
E:\Anaconda3>conda info -a
然后神奇地重命名后,conda info 现在显示 3.4.1.final.0 作为我的 python 版本,我的环境现在成功地位于 E:\Anaconda3 !!!(您可以在 cmd 输出的中途看到它)
在按回车键(对于 conda info -a)然后显示信息后有一个轻微的停顿。我可以在输出中看到的唯一区别是关于许可证 pfffffff 的一些警告
我的两个 anaconda 文件夹也都列在 PATH 中:
...E:\Anaconda;E:\Anaconda\Scripts;E:\Anaconda3;E:\Anaconda3\Scripts
在常见问题解答中,有 8 种不同的方式来激活和/或创建环境,没有一种比这更容易。
那么,这是改变 conda 环境的“坏”方式吗?我的意思是它到目前为止有效。但是,为什么它起作用了?
在我的天才突破之前:
E:\Anaconda3>conda info -a
Current conda install:
platform : win-64
conda version : 3.8.4
conda-build version : 1.8.2
python version : 2.7.8.final.0
requests version : 2.5.1
root environment : E:\Anaconda (writable)
default environment : E:\Anaconda
envs directories : E:\Anaconda\envs
package cache : E:\Anaconda\pkgs
channel URLs : http://repo.continuum.io/pkgs/free/win-64/
http://repo.continuum.io/pkgs/free/noarch/
http://repo.continuum.io/pkgs/pro/win-64/
http://repo.continuum.io/pkgs/pro/noarch/
config file : None
is foreign system : False
# conda environments:
#
root * E:\Anaconda
sys.version: 2.7.8 |Anaconda 2.1.0 (64-bit)| (default...
sys.prefix: E:\Anaconda
sys.executable: E:\Anaconda\python.exe
conda location: E:\Anaconda\lib\site-packages\conda
conda-build: E:\Anaconda\Scripts\conda-build.exe
conda-convert: E:\Anaconda\Scripts\conda-convert.exe
conda-develop: E:\Anaconda\Scripts\conda-develop.exe
conda-env: E:\Anaconda\Scripts\conda-env.exe
conda-index: E:\Anaconda\Scripts\conda-index.exe
conda-metapackage: E:\Anaconda\Scripts\conda-metapackage.exe
conda-pipbuild: E:\Anaconda\Scripts\conda-pipbuild.exe
conda-skeleton: E:\Anaconda\Scripts\conda-skeleton.exe
user site dirs:
CIO_TEST: <not set>
CONDA_DEFAULT_ENV: <not set>
CONDA_ENVS_PATH: <not set>
PATH: C:\Program Files (x86)\RSA SecurID Token Common;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsP
owerShell\v1.0\;e:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;e:\Program Files\AMD\ATI.ACE\Core-Static;E:\Python34_64bit;E:\Anaconda;E:\Anaconda\Scripts;E:\Anaconda3;E:\Anaconda3\Scripts
PYTHONHOME: <not set>
PYTHONPATH: <not set>
License directories:
C:\Users\Kardo Paska\.continuum
C:\Users\Kardo Paska\AppData\Roaming\Continuum
E:\Anaconda\licenses
License files (license*.txt):
Package/feature end dates:
E:\Anaconda3>
之后:
E:\Anaconda3>conda info -a
Current conda install:
platform : win-64
conda version : 3.7.0
conda-build version : 1.8.2
python version : 3.4.1.final.0
requests version : 2.4.1
root environment : E:\Anaconda3 (writable)
default environment : E:\Anaconda3
envs directories : E:\Anaconda3\envs
package cache : E:\Anaconda3\pkgs
channel URLs : http://repo.continuum.io/pkgs/free/win-64/
http://repo.continuum.io/pkgs/pro/win-64/
config file : None
is foreign system : False
# conda environments:
#
root * E:\Anaconda3
sys.version: 3.4.1 |Anaconda 2.1.0 (64-bit)| (default...
sys.prefix: E:\Anaconda3
sys.executable: E:\Anaconda3\python.exe
conda location: E:\Anaconda3\lib\site-packages\conda
conda-build: E:\Anaconda3\Scripts\conda-build.exe
conda-convert: E:\Anaconda3\Scripts\conda-convert.exe
conda-develop: E:\Anaconda3\Scripts\conda-develop.exe
conda-index: E:\Anaconda3\Scripts\conda-index.exe
conda-metapackage: E:\Anaconda3\Scripts\conda-metapackage.exe
conda-pipbuild: E:\Anaconda3\Scripts\conda-pipbuild.exe
conda-skeleton: E:\Anaconda3\Scripts\conda-skeleton.exe
user site dirs:
CIO_TEST: <not set>
CONDA_DEFAULT_ENV: <not set>
CONDA_ENVS_PATH: <not set>
PATH: C:\Program Files (x86)\RSA SecurID Token Common;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsP
owerShell\v1.0\;e:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;e:\Program Files\AMD\ATI.ACE\Core-Static;E:\Python34_64bit;E:\Anaconda;E:\Anaconda\Scripts;E:\Anaconda3;E:\Anaconda3\Scripts
PYTHONHOME: <not set>
PYTHONPATH: <not set>
WARNING: could not import _license.show_info
# try:
# $ conda install -n root _license
E:\Anaconda3>
好的!!
E:\Anaconda3>pip install py2exe
Downloading/unpacking py2exe
Installing collected packages: py2exe
Successfully installed py2exe
Cleaning up...
E:\Anaconda3>