'How do I change the pip install path to default install path in Anaconda?

My default pip install path is d:\conda\lib\site-packages\ or d:\conda,all my pip install are in this path. I use pip freeze | %{$.split('==')[0]} | %{pip install --upgrade $}

Somehow when I install pyqt5 , its in c:\users\michelle\appdata\roaming\python\python39\site-packages\pyqt5*, in other words, other packages work well in D, I dont know why pyqt5 in C. When I uninstall pyqt5, pyqt5 in C was deleted, but in D,there are still pyqt5. Then when I run code, I got:"ImportError: DLL load failed while importing QtCore:" .

I think maybe the reason cause error is tha path, so I wanna know how to change the path? All my packages in D instead of C.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source