pip install:Requirement already satisfied
已安装某包,在新的envs安装时显示Requirement already satisfied。
指定安装位置:
pip install --target=/home/anaconda3/envs/envs名字/lib/python3.8/site-packages 包名
(new_envs) cy@qwer-PR4764GW:~/baseline$ pip install sympy
Requirement already satisfied: sympy in /usr/local/anaconda3/lib/python3.7/site-packages (1.4)
Requirement already satisfied: mpmath>=0.19 in /usr/local/anaconda3/lib/python3.7/site-packages (from sympy) (1.1.0)
(new_envs) cy@qwer-PR4764GW:~/baseline$ pip install --target=/home/cy/anaconda3/envs/new_envs/lib/python3.8/site-packages sympy
Collecting sympy
Downloading https://files.pythonhosted.org/packages/d0/04/66be21ceb305c66a4b326b0ae44cc4f027a43bc08cac204b48fb45bb3653/sympy-1.10.1-py3-none-any.whl (6.4MB)
|████████████████████████████████| 6.4MB 970kB/s
Collecting mpmath>=0.19 (from sympy)
Downloading https://files.pythonhosted.org/packages/d4/cf/3965bddbb4f1a61c49aacae0e78fd1fe36b5dc36c797b31f30cf07dcbbb7/mpmath-1.2.1-py3-none-any.whl (532kB)
|████████████████████████████████| 542kB 12.0MB/s
Installing collected packages: mpmath, sympy
Successfully installed mpmath-1.2.1 sympy-1.10.1