Search code examples
tensorflowvisual-studio-codedeep-learning

remove Anaconda environment with no name/warning message after TensorFlow is upgraded


I upgraded the tensorflow, python and setup an new deep learning environment.

Problem 1

The new environment can work, but I get the following messages when I activate the environment.

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)

After type the command $ conda info --envs, I got the following information

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

I have tried the following commands to remove the 3rd one with no name, but they don't work

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

Problem 2

I also get the following message when I ran my codes. Do you think I need to fix the following problems? Thanks.

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

Solution

  • Finally I just omit this environment as suggested by Dev Bhuyan.

    Here I learned a lesson that may be also helpful to others.

    Please remove all the virtual environment before you make updates on your software (like python, tensorflow) and create a new environment. Otherwise you may meet the same problem as I met.