After activating the virtual environment, use conda list to check that the installed package exists in pip.
But the package installed with pip is still installed in the global environment, and this package can only be installed with pip, not conda.
So how can it be packaged into a virtual environment?
You can use pip in the virtual environment, because when configuring .bashrc, it is set to use the pip of the global environment
So here we use the pip of the virtual environment
1. Find the pip of the virtual environment, mine is
/home/dlge/anaconda3/envs/pytorch1.4/bin/pip
2. Then install the package normally
/home/dlge/anaconda3/envs/pytorch1.4/bin/pip install --editable ./
conda list to see if the installation is successful
Get it done!