Record a strange little problem.
In order to complete the emotional dialogue project arranged by my tutor, I found a model from GitHub, and then configured the environment python2.7 + tensorflow1.13.1 on the server according to readme. At the beginning of training, I found that the training speed was very slow. After checking, I found that I didn’t use the GPU version of tensorflow, so I changed it to tensorflow-gpu1.13.1.
Import error: libcublas. So. 10.0: cannot open shared object file: no such file or directory
Very common old problem, CUDA is not installed or environment variables are not configured. I didn’t add CUDA to the environment variable here, because it’s a server in the school laboratory. It doesn’t have sudo permission and can’t modify the environment variable of the system, so I can only add the environment variable I need with the export command every time I start the terminal. For convenience, all the environment variables that need to be exported are recorded in a file. You only need the file source each time.
After the source is completed, a strange problem appears. I output Python 3.8.5 with Python command in CONDA environment, and the python version of the environment shown in CONDA list is 2.7, as shown in the figure below. Clearly is the environment of Python 2.7, why use the python command to prompt that the current version is Python 3.8.5?I try to import tensorflow. It also prompts no module named tensorflow, which means that although it shows that I am in the dual RL master environment, I am in another environment?
I repeatedly tried to delete the environment, create a new environment, and re install various packages. After many tests, I finally found the problem. When CONDA activate is executed, the target environment will be added to the environment variable of the current system, so when the python command is executed on the command line, the python version in the target environment will be executed. When the export command is executed, the specified environment variable will be added to the system environment variable. When the variable name is repeated, the existing environment variable will be overridden. When I use source to execute files containing many export commands, one of the export commands adds the default Python version of CONDA to the environment variables of the system, which covers the python version I activated with CONDA before. Therefore, although my CONDA shows that the python version I used is 2.7, the environment variables of the system have been covered by the export command I used later, The default version of Python is 3.8.5.
I tested again. First add a python version to the environment variable by using export, and then use CONDA activate to activate another version of Python. Using Python on the command line, you will find that the output is the later version of Python. Therefore, you can conclude that the one added after the same variable name in the environment variable will override the existing one.
Although it’s not a big problem, sometimes it’s this kind of energy-saving twig that keeps you from finding mistakes.
- Anaconda builds a new environment and installs sklearn, numpy and other modules
- Configuration (9) to solve the problem of “setup tools PIP wheel failed with error code 1”, create virtual environments with Python of anaconda
- Solve the problem of Python in Windows environment: Fatal error in launcher: Unable to create process using’”‘ in pip installation
- Anaconda create environment, delete environment, activate environment, exit environment
- CONDA creating virtual environment and common CONDA commands
- Tensorflow installation and uninstall (Anaconda version)
- Install Java runtime JRE in Ubuntu 16.04
- Terminal appears after anconda is installed on MAC (base)
- CONDA failed to create environment (collecting package metadata（repodata.json): failed)
- Attributeerror: module tensorflow no attribute app solution
- Anaconda returns Python 3.7 to Python 3.6
- CONDA 3090 install tenslow GPU report error importerror: libcublas.so .9.0: cannot open shared object file
- Data analysis to obtain Yahoo stock data: some problems are encountered when using panda datareader (cannot import name ‘is_ list_ Like ‘problem)
- source, ~/.bashrc, ~/.bash_ Profile details
- The app failed to start because there is no Qt platform to initialize
- AttributeError: module ‘keras.backend‘ has no attribute ‘eager‘
- Solve the problem of prompt couldn’t find path to unrear library after installing unrear in Python
- After canceling the startup of Ubuntu terminal, it will automatically enter the base environment of CONDA
- tensorflow import error: DLL load failed: The specified module could not be found (DLL load failed: The specified module could not be found)
- Tensorflow import error: DLL load failed: the specified module could not be found