TensorFlow升级后删除无名称/警告消息的Anaconda环境

问题描述 投票:0回答:1

我升级了tensorflow、python并设置了新的深度学习环境。

问题1

新环境可以工作,但激活环境时收到以下消息。

Erick MINGW64 /z/Erick/CNN_Demo/noise_reduction (master)
$ source activate
(base) 
Erick MINGW64 /z/Erick/CNN_ Demo/noise_reduction (master)
$ conda activate z:\Erick/CNN_ Demo \noise_reduction\.conda

EnvironmentNameNotFound: Could not find conda environment: z: Erick/CNN_ Demo noise_reduction.conda
You can list all discoverable environments with `conda info --envs`.

(base) 
Erick MINGW64 /z/ Erick/CNN_ Demo/noise_reduction (master)

输入命令

$ conda info --envs
后,我得到以下信息

conda environments:
#
base                  *  C:\Users\Erick\AppData\Local\anaconda3        
tf                       C:\Users\Erick\AppData\Local\anaconda3\envs\tf
                         z:\Erick/CNN_Demo\noise_reduction\.conda

我已尝试以下命令来删除第三个没有名称的命令,但它们不起作用

conda env remove -p z:\Erick/CNN_Demo\noise_reduction\.conda

conda env remove -p z:\Erick/CNN_Demo\noise_reduction\

conda env remove -p z:\Erick/CNN_Demo\noise_reduction

问题2

当我运行代码时,我还收到以下消息。您认为我需要解决以下问题吗?谢谢。

Z:\Zhou_ZX\CNN_CTCIC\noise_reduction\GARNET_alpha\core\scripts\PBAR_callbacks.py:16: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if __name__ == '__main__' or __package__ is '':

<>:110: SyntaxWarning: "is" with a literal. Did you mean "=="?

<>:114: SyntaxWarning: "is" with a literal. Did you mean "=="?

C:\Users\Erick\AppData\Local\anaconda3\lib\site-packages\keras\optimizers\optimizer_v2\adam.py:114: UserWarning: The `lr` argument is deprecated, use `learning_rate` instead.
  super().__init__(name, **kwargs)

<ipython-input-3-bddb21d030e0>:110: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if arch_sel is 'ResNet':
<ipython-input-3-bddb21d030e0>:114: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if arch_sel is 'UNet':
2023-06-21 13:38:27.269647: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-06-21 13:38:28.930986: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1616] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 9825 MB memory:  -> device: 0, name: NVIDIA TITAN V, pci bus id: 0000:65:00.0, compute capability: 7.0
tensorflow visual-studio-code deep-learning
1个回答
0
投票

最后我按照 Dev Bhuyan 的建议省略了这个环境。

在这里我学到了一个可能对其他人也有帮助的教训。

在更新软件(例如 python、tensorflow)并创建新环境之前,请删除所有虚拟环境。否则你可能会遇到和我遇到的同样的问题。

© www.soinside.com 2019 - 2024. All rights reserved.