Recently, due to the need to set up a new environment for the GUI interface, an error occurred in the header line during the process of creating a new environment.
The significance of creating a new environment
As each project requires different libraries and their versions, running the project in the root directory will be much more complicated, which is why many people will choose to use a virtual environment. That is, suppose you do project A with package versions PyQt5=’5.5.1′ and sklearn=’0.22.1′, and project B with package versions PyQt5=’5.6.1′ and sklearn=’0.23.1′, then you have to uninstall PyQt5 5.5.1 and sklearn0.22.1 and install PyQt5 5.6.1′ and sklearn0.23.1, but then you have to uninstall the previous package version to do something like project 1, so it’s a lot of trouble to go back and forth, so why not create virtual environment A with PyQt5 5.5.1 and sklearn0.22.1, virtual environment B with PyQt5 5.6.1′ and sklearn0.23.1, and do project A will use virtual environment A, and project B will use virtual environment B, which will not interfere with each other and improve the convenience a lot.
If you have reinstalled anaconda, a file named .condarc will be automatically generated in the user directory on the C drive.
When using the commands conda install and conda create, the following problem occurs: Collecting package metadata (current_repodata.json): failed
First, a few words about the role of the .condarc file.
.condarc starts with a dot and generally indicates the configuration file for the conda application, in the user’s home directory (windows: C:\\users\\\username\\, linux: /home/username/).
For the .condarc configuration file, which is an optional (optional) runtime configuration file, this file is not available by default and is only created automatically after you have executed the conda config command. This file is the configuration file for conda in YAML format. For example, you can set the channel to install the package, whether to automatically update conda, whether to allow other channels, and other settings.
1. Open Anaconda Prompt and enter the following command
conda config --show-sources
As shown in the figure, the running result is displayed that the .condarc file is in the C:\Users\DELL folder
2. Delete .condarc file
The problem was solved successfully!!!
- [Solved] CONDA Error: Collecting package metadata (current_repodata.json): failed…
- [Solved] Failed environment install leads to “unable to create process using“ error
- Jupyter notebook Failed to Switch to the Virual Environment: DLL load failed python.exe could not find the entry
- [Solved] Python Error: An attempt has been made to start a new process before the current process has finished …
- Python Error: Failed to establish a new connection: [Errno -2] Name or service not known
- The PIP installation package was successful but the import failed
- [Solved] PySide2 Failed to Create a Graphical Python Program
- [Solved] CONDA ENV create and run Error: F environment.yml under win10
- Failed to establish a new connection: [winerror 10048] in the requests thread pool, the interface is called circularly to get the datagram error
- [Solved] UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring it
- [Solved] PyCharm Failed to Start Error: failed to create jvm.jvm path…
- How to Solve pycharm terminal Failed to switch to virtual environment
- RuntimeError: Failed to register operator torchvision::_new_empty_tensor_op. +torch&torchversion Version Matching
- [Solved] python tqdm raise RuntimeError(“cannot join current thread“) RuntimeError: cannot join current thr
- [Solved] Jupyter Notebook Start Error: Fatal error in launcher: Unable to create process using
- [Solved] Pyinstaller Error: “RuntimeError: No metadata path found for distribution ‘greenlet‘
- [Solved] Pyinstaller packaged exe error: “failed to execute script XXX”
- [Solved] Pytorch Install Error: Solving environment: failed with initial frozen solve. Retrying with flexible solve
- [Solved] Conda Upgrade Error: PackageNotInstalledError: Package is not installed in prefix.
- VScode Run CONDA environment Error [How to Solve]