我已经使用以下命令将conda升级到了4.9.0:
public class CustomWebApplicationFactory<TStartup> : WebApplicationFactory<TStartup>
where TStartup : class
{
public CustomWebApplicationFactory()
{
}
protected override void ConfigureWebHost(IWebHostBuilder builder)
{
builder.ConfigureServices(services =>
{
services.AddDbContext<DatabaseContext>(options =>
{
options.UseInMemoryDatabase("InMemoryDatabaseForTesting");
});
}
}
}
由conda自己推荐,在“警告:存在conda的较新版本。(...)”
之后,另一个环境不再看到以前的软件包:
conda update -n base -c defaults conda
产生一个空列表。我正在Windows 10下运行Anaconda。
这种行为正常吗?有没有办法恢复我以前的conda activate tstb2
conda list
环境?
编辑:我在下面添加了cmd输出。
tstb2
编辑2:这些模块仍然对(tstb2) C:\Users\ws>conda activate tstb2
(tstb2) C:\Users\ws>conda list -n tstb2
# packages in environment at C:\Users\ws\AppData\Local\Continuum\anaconda3\envs\tstb2:
#
# Name Version Build Channel
(tstb2) C:\Users\ws>conda info
active environment : tstb2
active env location : C:\Users\ws\AppData\Local\Continuum\anaconda3\envs\tstb2
shell level : 2
user config file : C:\Users\ws\.condarc
populated config files : C:\Users\ws\.condarc
conda version : 4.9.0
conda-build version : 3.18.9
python version : 3.7.4.final.0
virtual packages : __win=0=0
__archspec=1=x86_64
base environment : C:\Users\ws\AppData\Local\Continuum\anaconda3 (writable)
channel URLs : 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
package cache : C:\Users\ws\AppData\Local\Continuum\anaconda3\pkgs
C:\Users\ws\.conda\pkgs
C:\Users\ws\AppData\Local\conda\conda\pkgs
envs directories : C:\Users\ws\AppData\Local\Continuum\anaconda3\envs
C:\Users\ws\.conda\envs
C:\Users\ws\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.9.0 requests/2.24.0 CPython/3.7.4 Windows/10 Windows/10.0.17763
administrator : False
netrc file : None
offline mode : False
可见。
答案 0 :(得分:0)
我最终解决的方法是根据项目的setup.py
重新创建环境。但是我不知道它来自哪里。