Open YeeHoran opened 1 year ago
The former section shows how to reinstall Anaconda, and this section will show how to install tensorflow with Anaconda:
Then, it indicates that 'torchvision' is not available. This is solved by running the cmd of 'pip install torchvision'.
Next, when running the code, it indicates that 'deepface' is not available. This is solved by running the cmd 'pip install deepface'.
In addition, when go on running it, it shows the following error, and will be solve next time.
File ~/Documents/1. Research/1. FER project/2. FER codes/3. Deepface-based-20230124/7. identity disentangled FER/common FER-20230412.py:171 criterion=tf.Keras.losses.CategoricalCrossentropy()
AttributeError: module 'tensorflow' has no attribute 'Keras'
When I debug common FER code, using the face embedding module from DeepFace as the network structure and use it as initialization, the spyder collapse when I begin to work one day. I tried many ways to downgrade or upgrade spyder version, but no help! So it's time to reinstall Anaconda.
The steps are as follows,
After the command : conda info, it shows the following info and they are presented here for other related future installation reference. (base) yi@Yi:~/Documents/2. Software$ conda info
active environment : base active env location : /home/yi/anaconda3 shell level : 1 user config file : /home/yi/.condarc populated config files : /home/yi/.condarc conda version : 23.1.0 conda-build version : 3.23.3 python version : 3.10.9.final.0 virtual packages : __archspec=1=x86_64 cuda=11.7=0 glibc=2.31=0 linux=5.15.0=0 unix=0=0 base environment : /home/yi/anaconda3 (writable) conda av data dir : /home/yi/anaconda3/etc/conda conda av metadata url : None channel URLs : https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /home/yi/anaconda3/pkgs /home/yi/.conda/pkgs envs directories : /home/yi/anaconda3/envs /home/yi/.conda/envs platform : linux-64 user-agent : conda/23.1.0 requests/2.28.1 CPython/3.10.9 Linux/5.15.0-69-generic ubuntu/20.04.3 glibc/2.31 UID:GID : 1000:1000 netrc file : None offline mode : False