我在Windows 10上使用Cygwin和Conda包管理,使用Cygwin非常古怪,我似乎无法弄清楚发生了什么。
像activate myEnv
这样的命令在Cygwin终端中不起作用(如文档所示),但conda activate myEnv
可行。我也无法在激活的环境中安装应用程序 - 它说环境文件夹中没有环境。如果我指定环境名称,一切正常。我无法停用环境。
我只需要对我的设置进行完全卸载或任何建议吗?
列出环境:
joshua@Josh-Laptop ~
$ conda info --envs
# conda environments:
#
base * C:\Users\joshu\Anaconda3
MLenv C:\Users\joshu\Anaconda3\envs\MLenv
Web C:\Users\joshu\Anaconda3\envs\Web
ml C:\Users\joshu\Anaconda3\envs\ml
尝试激活环境MLenv
joshua@Josh-Laptop ~
$ activate MLenv
仍然选择了基础问题
joshua@Josh-Laptop ~
$ conda info --envs
# conda environments:
#
base * C:\Users\joshu\Anaconda3
MLenv C:\Users\joshu\Anaconda3\envs\MLenv
Web C:\Users\joshu\Anaconda3\envs\Web
ml C:\Users\joshu\Anaconda3\envs\ml
尝试再次激活(使用指定的conda)
joshua@Josh-Laptop ~
$ conda activate MLenv
但环境旁边没有星号?
(MLenv)
joshua@Josh-Laptop ~
conda info --envs
# conda environments:
#
base C:\Users\joshu\Anaconda3
MLenv C:\Users\joshu\Anaconda3\envs\MLenv
Web C:\Users\joshu\Anaconda3\envs\Web
ml C:\Users\joshu\Anaconda3\envs\ml
尝试安装软件包,找不到环境?
(MLenv)
joshua@Josh-Laptop ~
conda install scikit-learn
EnvironmentLocationNotFound: Not a conda environment:
C:\Users\joshu\Anaconda3\envs\MLenv
再次尝试,但指定环境(现在识别位置)。
(MLenv)
joshua@Josh-Laptop ~
conda install scikit-learn -n MLenv
Solving environment: ...working... done
## Package Plan ##
environment location: C:\Users\joshu\Anaconda3\envs\MLenv
added / updated specs:
- scikit-learn
The following NEW packages will be INSTALLED:
scikit-learn: 0.19.1-py36h53aea1b_0
Proceed ([y]/n)? y
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
最后但并非最不重要的是,我无法停用我的环境
)(MLenv)
joshua@Josh-Laptop ~
source deactivate
)(MLenv)
joshua@Josh-Laptop ~
conda info --envs
# conda environments:
#
base C:\Users\joshu\Anaconda3
MLenv C:\Users\joshu\Anaconda3\envs\MLenv
Web C:\Users\joshu\Anaconda3\envs\Web
ml C:\Users\joshu\Anaconda3\envs\ml
)(MLenv)
joshua@Josh-Laptop ~
deactivate
)(MLenv)
joshua@Josh-Laptop ~
conda info --envs
# conda environments:
#
base C:\Users\joshu\Anaconda3
MLenv C:\Users\joshu\Anaconda3\envs\MLenv
Web C:\Users\joshu\Anaconda3\envs\Web
ml C:\Users\joshu\Anaconda3\envs\ml
以下是我的路径(已激活MLenv)
) (MLenv)
joshua@Josh-Laptop ~
echo $PATH | tr ":" "\n" | nl
1 /cygdrive/c/Users/joshu/Anaconda3/envs/MLenv
/Library/mingw-w64/biners/joshu/Anaconda3/envs/MLenv
/Library/usr/bine/c/Users/joshu/Anaconda3/envs/MLenv
/Library/bindrive/c/Users/joshu/Anaconda3/envs/MLenv
/Scripts/cygdrive/c/Users/joshu/Anaconda3/envs/MLenv
/bin 6 /cygdrive/c/Users/joshu/Anaconda3/envs/MLenv
7 /cygdrive/c/Users/joshu/Anaconda3/envs/MLenv
8 /cygdrive/c/Users/joshu/Anaconda3/envs/MLenv/Library/mingw-w64/bin
9 /cygdrive/c/Users/joshu/Anaconda3/envs/MLenv/Library/usr/bin
10 /cygdrive/c/Users/joshu/Anaconda3/envs/MLenv/Library/bin
11 /cygdrive/c/Users/joshu/Anaconda3/envs/MLenv/Scripts
12 /cygdrive/c/Users/joshu/Anaconda3/envs/MLenv/bin
13 /cygdrive/c/Users/joshu/Anaconda3
14 /usr/local/bin
15 /usr/bin
16 /cygdrive/c/Cygwin/bin
17 /cygdrive/c/users/joshu
18 /cygdrive/c/Program Files (x86)/Intel/iCLS Client
19 /cygdrive/c/Program Files/Intel/iCLS Client
20 /cygdrive/c/WINDOWS/system32
21 /cygdrive/c/WINDOWS
22 /cygdrive/c/WINDOWS/System32/Wbem
23 /cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0
24 /cygdrive/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL
25 /cygdrive/c/Program Files/Intel/Intel(R) Management Engine Components/DAL
26 /cygdrive/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT
27 /cygdrive/c/Program Files/Intel/Intel(R) Management Engine Components/IPT
28 /cygdrive/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit
29 /cygdrive/c/Program Files/Intel/WiFi/bin
30 /cygdrive/c/Program Files/Common Files/Intel/WirelessCommon
31 /cygdrive/c/Program Files/PuTTY
32 /cygdrive/c/Program Files/HDF_Group/HDF5/1.8.19/bin
33 /cygdrive/c/Program Files/MiKTeX 2.9/miktex/bin/x64
34 /cygdrive/c/Users/joshu/Anaconda3
35 /cygdrive/c/Users/joshu/Anaconda3/Scripts
36 /cygdrive/c/Users/joshu/Anaconda3/Library/bin
37 /cygdrive/c/Users/joshu/Anaconda3/ffmpeg/bin
38 /cygdrive/c/Users/joshu/AppData/Local/Microsoft/WindowsApps
39 /cygdrive/c/Users/joshu/AppData/Local/Google/Cloud SDK/google-cloud-sdk/bin
40 /cygdrive/c/Users/joshu/AppData/Local/GitHubDesktop/bin
41 /cygdrive/c/Program Files/Microsoft VS Code/bin
42 /cygdrive/c/cygwin/bin
43 /cygdrive/c/Users/joshu/Anaconda3/python.exe
44 /usr/bin/python2.7.exe
45 /usr/bin/aws
**这是我的路径(新窗口,没有环境激活)**
joshua@Josh-Laptop ~
$ echo $PATH | tr ":" "\n" | nl
1 /cygdrive/c/Users/joshu/Anaconda3
2 /usr/local/bin
3 /usr/bin
4 /cygdrive/c/Cygwin/bin
5 /cygdrive/c/users/joshu
6 /cygdrive/c/Program Files (x86)/Intel/iCLS Client
7 /cygdrive/c/Program Files/Intel/iCLS Client
8 /cygdrive/c/WINDOWS/system32
9 /cygdrive/c/WINDOWS
10 /cygdrive/c/WINDOWS/System32/Wbem
11 /cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0
12 /cygdrive/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL
13 /cygdrive/c/Program Files/Intel/Intel(R) Management Engine Components/DAL
14 /cygdrive/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT
15 /cygdrive/c/Program Files/Intel/Intel(R) Management Engine Components/IPT
16 /cygdrive/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit
17 /cygdrive/c/Program Files/Intel/WiFi/bin
18 /cygdrive/c/Program Files/Common Files/Intel/WirelessCommon
19 /cygdrive/c/Program Files/PuTTY
20 /cygdrive/c/Program Files/HDF_Group/HDF5/1.8.19/bin
21 /cygdrive/c/Program Files/MiKTeX 2.9/miktex/bin/x64
22 /cygdrive/c/Users/joshu/Anaconda3
23 /cygdrive/c/Users/joshu/Anaconda3/Scripts
24 /cygdrive/c/Users/joshu/Anaconda3/Library/bin
25 /cygdrive/c/Users/joshu/Anaconda3/ffmpeg/bin
26 /cygdrive/c/Users/joshu/AppData/Local/Microsoft/WindowsApps
27 /cygdrive/c/Users/joshu/AppData/Local/Google/Cloud SDK/google-cloud-sdk/bin
28 /cygdrive/c/Users/joshu/AppData/Local/GitHubDesktop/bin
29 /cygdrive/c/Program Files/Microsoft VS Code/bin
30 /cygdrive/c/cygwin/bin
31 /cygdrive/c/Users/joshu/Anaconda3/python
32 /cygdrive/c/cygwin64/bin/python
33 /cygdrive/c/cygwin64/bin/aws