在安装软件包后停用环境,然后详细打印Conda

时间:2019-02-14 09:53:39

标签: python anaconda pymc3

每当我尝试激活conda环境并随后尝试安装软件包时,安装conda都会在屏幕上打印很多命令(而以前,在安装后,您将返回命令行)。例如,如果我尝试安装beautifulsoup:

$activate py37
$(py37) conda install -c anaconda beautifulsoup4
...<install happens here as normal>...
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
...<things get weird here>...
SET DISTUTILS_USE_SDK=1
SET MSSdk=1
SET platform=
...<hundreds of lines later>...
$...<environment has been deactivated>...

在我尝试安装pymc3之后,我第一次注意到这种情况。对于pymc3来说,安装似乎进行得很好,但是当我将其导入脚本时,我得到了ImportError,因为找不到该模块。对于其他软件包(例如beautifulsoup),安装过程正常,我也可以按预期将软件包导入脚本中。

有时候我什至无法激活环境

$activate py37
..<previously this would activate the env and just return the command line immediately>...
conda.bat activate py37
SET DISTUTILS_USE_SDK=1
...<same verbosity as above>...
CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\..\..\VC\vcvarsall.bat" amd64
The input line is too long.
The syntax of the command is incorrect.
$...<the environment has not been activated>...

我的anaconda环境/设置/配置出了什么问题?如何将其还原为以前未在屏幕上打印的设置?这与pymc3有关吗?

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题。 install --revision 1恢复到修订版1对我有用。谢谢。

如果在运行conda list --revisions之前,它会输出以下版本的conda环境:

    2020-05-01 20:15:55  (rev 0)
+_tflow_select-2.2.0 (defaults/win-64)
+absl-py-0.9.0 (defaults/win-64)
+asn1crypto-1.3.0 (defaults/win-64)
+astor-0.8.0 (defaults/win-64)
+blas-1.0 (defaults/win-64)
+blinker-1.4 (defaults/win-64)
+ca-certificates-2020.1.1 (defaults/win-64)
+cachetools-3.1.1 (defaults/noarch)
+certifi-2020.4.5.1 (defaults/win-64)
+cffi-1.14.0 (defaults/win-64)
+chardet-3.0.4 (defaults/win-64)
+click-7.1.1 (defaults/noarch)
+cryptography-2.8 (defaults/win-64)
+gast-0.2.2 (defaults/win-64)
+google-auth-1.13.1 (defaults/noarch)
+google-auth-oauthlib-0.4.1 (defaults/noarch)
+google-pasta-0.2.0 (defaults/noarch)
+grpcio-1.27.2 (defaults/win-64)
+h5py-2.10.0 (defaults/win-64)
+hdf5-1.10.4 (defaults/win-64)
+icc_rt-2019.0.0 (defaults/win-64)
+idna-2.9 (defaults/noarch)
+intel-openmp-2020.0 (defaults/win-64)
+keras-applications-1.0.8 (defaults/noarch)
+keras-preprocessing-1.1.0 (defaults/noarch)
+libprotobuf-3.11.4 (defaults/win-64)
+markdown-3.1.1 (defaults/win-64)
+mkl-2020.0 (defaults/win-64)
+mkl-service-2.3.0 (defaults/win-64)
+mkl_fft-1.0.15 (defaults/win-64)
+mkl_random-1.1.0 (defaults/win-64)
+numpy-1.18.1 (defaults/win-64)
+numpy-base-1.18.1 (defaults/win-64)
+oauthlib-3.1.0 (defaults/noarch)
+openssl-1.1.1g (defaults/win-64)
+opt_einsum-3.1.0 (defaults/noarch)
+pip-20.0.2 (defaults/win-64)
+protobuf-3.11.4 (defaults/win-64)
+pyasn1-0.4.8 (defaults/noarch)
+pyasn1-modules-0.2.7 (defaults/noarch)
+pycparser-2.20 (defaults/noarch)
+pyjwt-1.7.1 (defaults/win-64)
+pyopenssl-19.1.0 (defaults/win-64)
+pyreadline-2.1 (defaults/win-64)
+pysocks-1.7.1 (defaults/win-64)
+python-3.7.7 (defaults/win-64)
+requests-2.23.0 (defaults/win-64)
+requests-oauthlib-1.3.0 (defaults/noarch)
+rsa-4.0 (defaults/noarch)
+scipy-1.4.1 (defaults/win-64)
+setuptools-46.1.3 (defaults/win-64)
+six-1.14.0 (defaults/win-64)
+sqlite-3.31.1 (defaults/win-64)
+tensorboard-2.1.0 (defaults/noarch)
+tensorflow-2.1.0 (defaults/win-64)
+tensorflow-base-2.1.0 (defaults/win-64)
+tensorflow-estimator-2.1.0 (defaults/noarch)
+termcolor-1.1.0 (defaults/win-64)
+urllib3-1.25.8 (defaults/win-64)
+vc-14.1 (defaults/win-64)
+vs2015_runtime-14.16.27012 (defaults/win-64)
+werkzeug-0.16.1 (defaults/noarch)
+wheel-0.34.2 (defaults/win-64)
+win_inet_pton-1.1.0 (defaults/win-64)
+wincertstore-0.2 (defaults/win-64)
+wrapt-1.12.1 (defaults/win-64)
+zlib-1.2.11 (defaults/win-64)    2020-05-01 20:58:44  (rev 1)
+keras-2.3.1 (defaults/win-64)
+keras-base-2.3.1 (defaults/win-64)
+pyyaml-5.3.1 (defaults/win-64)
+yaml-0.1.7 (defaults/win-64)    2020-05-01 21:19:04  (rev 2)
 ca-certificates  {2020.1.1 (defaults/win-64) -> 2020.4.5.1 (conda-forge/win-64)}
 certifi  {2020.4.5.1 (defaults/win-64) -> 2020.4.5.1 (conda-forge/win-64)}
 keras  {2.3.1 (defaults/win-64) -> 2.3.1 (conda-forge/win-64)}
 openssl  {1.1.1g (defaults/win-64) -> 1.1.1g (conda-forge/win-64)}
+libgpuarray-0.7.6 (conda-forge/win-64)
+mako-1.1.0 (conda-forge/noarch)
+markupsafe-1.1.1 (conda-forge/win-64)
+pygpu-0.7.6 (conda-forge/win-64)
+python_abi-3.7 (conda-forge/win-64)
+theano-1.0.4 (conda-forge/win-64)
+vs2015_win-64-14.0.25420 (defaults/win-64)   2020-05-02 20:27:02  (rev 3)
 ca-certificates  {2020.4.5.1 (conda-forge/win-64) -> 2020.1.1 (defaults/win-64)}
 certifi  {2020.4.5.1 (conda-forge/win-64) -> 2020.4.5.1 (defaults/win-64)}
 keras  {2.3.1 (conda-forge/win-64) -> 2.3.1 (defaults/win-64)}
 openssl  {1.1.1g (conda-forge/win-64) -> 1.1.1g (defaults/win-64)}

>

Python版本:3.7.7 康达版本:4.8.3