【发布时间】:2021-11-17 01:12:39
【问题描述】:
我在可编辑模式下安装了我的 Ultimate-utils 包,但每当我这样做时,它似乎会自行安装它的旧版本。
我确实看到了这个问题:Why is pip installing an old version of my package?
但认为询问仍然很有趣,因为尽管重新安装东西可能会起作用,例如与
pip install --no-cache-dir --upgrade -e ~/ultimate-utils/ultimate-utils-proj-src
或
pip install -vvv -e ~/ultimate-utils/ultimate-utils-proj-src
在我的 HPC 中,进行 pip 安装是一项昂贵的操作。所以最好看看如何找到旧版本的库并在本地删除它(如果它正在使用它进行安装)。
见:
(synthesis) miranda9~/type-parametric-synthesis $ pip list
Package Version Location
------------------------------------- ------------ -----------------------------------------------------
absl-py 0.14.0
...
ultimate-utils 0.2.0 /home/miranda9/ultimate-utils/ultimate-utils-proj-src
... 1.26.7
uutils 0.1.0
...
我认为 pip 列表中不应该有 uutils,而且绝对不应该是 0.1.0。如何让 pip 停止执行此操作或找到 uutils 位置并将其删除?
我对安装输出进行了 greped,但它甚至没有提到 uutils!
(synthesis) miranda9~/type-parametric-synthesis $ pip install -e ~/ultimate-utils/ultimate-utils-proj-src
Obtaining file:///home/miranda9/ultimate-utils/ultimate-utils-proj-src
Requirement already satisfied: torch==1.9.1 in /home/miranda9/miniconda3/envs/synthesis/lib/python3.9/site-packages (from ultimate-utils==0.2.0) (1.9.1+cu111)
Requirement already satisfied: torchvision==0.10.1 in /home/miranda9/miniconda3/envs/synthesis/lib/python3.9/site-packages (from ultimate-utils==0.2.0) (0.10.1+cu111)
Requirement already satisfied: torchaudio==0.9.1 in /home/miranda9/miniconda3/envs/synthesis/lib/python3.9/site-packages (from ultimate-utils==0.2.0) (0.9.1)
Collecting dill
Using cached dill-0.3.4-py2.py3-none-any.whl (86 kB)
Collecting networkx>=2.5
Using cached networkx-2.6.3-py3-none-any.whl (1.9 MB)
Collecting scipy
Using cached scipy-1.7.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (28.5 MB)
Collecting scikit-learn
Using cached scikit_learn-0.24.2-cp39-cp39-manylinux2010_x86_64.whl (23.8 MB)
Collecting lark-parser
Using cached lark_parser-0.12.0-py2.py3-none-any.whl (103 kB)
Collecting torchtext>=0.8.1
Using cached torchtext-0.10.1-cp39-cp39-manylinux1_x86_64.whl (7.6 MB)
Collecting tensorboard
Using cached tensorboard-2.6.0-py3-none-any.whl (5.6 MB)
Collecting pandas
Using cached pandas-1.3.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.5 MB)
Collecting progressbar2
Using cached progressbar2-3.53.3-py2.py3-none-any.whl (25 kB)
Collecting transformers
Using cached transformers-4.10.3-py3-none-any.whl (2.8 MB)
Collecting requests
Using cached requests-2.26.0-py2.py3-none-any.whl (62 kB)
Collecting aiohttp
Using cached aiohttp-3.7.4.post0-cp39-cp39-manylinux2014_x86_64.whl (1.4 MB)
Requirement already satisfied: numpy in /home/miranda9/miniconda3/envs/synthesis/lib/python3.9/site-packages (from ultimate-utils==0.2.0) (1.21.2)
Collecting plotly
Using cached plotly-5.3.1-py2.py3-none-any.whl (23.9 MB)
Collecting wandb
Using cached wandb-0.12.2-py2.py3-none-any.whl (1.7 MB)
Collecting matplotlib
Using cached matplotlib-3.4.3-cp39-cp39-manylinux1_x86_64.whl (10.3 MB)
Requirement already satisfied: typing-extensions in /home/miranda9/miniconda3/envs/synthesis/lib/python3.9/site-packages (from torch==1.9.1->ultimate-utils==0.2.0) (3.10.0.2)
Requirement already satisfied: pillow>=5.3.0 in /home/miranda9/miniconda3/envs/synthesis/lib/python3.9/site-packages (from torchvision==0.10.1->ultimate-utils==0.2.0) (8.3.2)
Collecting tqdm
Using cached tqdm-4.62.3-py2.py3-none-any.whl (76 kB)
Collecting yarl<2.0,>=1.0
Using cached yarl-1.6.3-cp39-cp39-manylinux2014_x86_64.whl (315 kB)
Collecting attrs>=17.3.0
Using cached attrs-21.2.0-py2.py3-none-any.whl (53 kB)
Collecting chardet<5.0,>=2.0
Using cached chardet-4.0.0-py2.py3-none-any.whl (178 kB)
Collecting async-timeout<4.0,>=3.0
Using cached async_timeout-3.0.1-py3-none-any.whl (8.2 kB)
Collecting multidict<7.0,>=4.5
Using cached multidict-5.1.0-cp39-cp39-manylinux2014_x86_64.whl (151 kB)
Collecting idna>=2.0
Using cached idna-3.2-py3-none-any.whl (59 kB)
Collecting pyparsing>=2.2.1
Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting cycler>=0.10
Using cached cycler-0.10.0-py2.py3-none-any.whl (6.5 kB)
Collecting python-dateutil>=2.7
Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting kiwisolver>=1.0.1
Using cached kiwisolver-1.3.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.6 MB)
Collecting six
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting pytz>=2017.3
Using cached pytz-2021.1-py2.py3-none-any.whl (510 kB)
Collecting tenacity>=6.2.0
Using cached tenacity-8.0.1-py3-none-any.whl (24 kB)
Collecting python-utils>=2.3.0
Using cached python_utils-2.5.6-py2.py3-none-any.whl (12 kB)
Requirement already satisfied: certifi>=2017.4.17 in /home/miranda9/miniconda3/envs/synthesis/lib/python3.9/site-packages (from requests->ultimate-utils==0.2.0) (2021.5.30)
Collecting urllib3<1.27,>=1.21.1
Using cached urllib3-1.26.7-py2.py3-none-any.whl (138 kB)
Collecting charset-normalizer~=2.0.0
Using cached charset_normalizer-2.0.6-py3-none-any.whl (37 kB)
Collecting threadpoolctl>=2.0.0
Using cached threadpoolctl-2.2.0-py3-none-any.whl (12 kB)
Collecting joblib>=0.11
Using cached joblib-1.0.1-py3-none-any.whl (303 kB)
Collecting google-auth<2,>=1.6.3
Using cached google_auth-1.35.0-py2.py3-none-any.whl (152 kB)
Collecting google-auth-oauthlib<0.5,>=0.4.1
Using cached google_auth_oauthlib-0.4.6-py2.py3-none-any.whl (18 kB)
Collecting tensorboard-plugin-wit>=1.6.0
Using cached tensorboard_plugin_wit-1.8.0-py3-none-any.whl (781 kB)
Collecting werkzeug>=0.11.15
Using cached Werkzeug-2.0.1-py3-none-any.whl (288 kB)
Collecting tensorboard-data-server<0.7.0,>=0.6.0
Using cached tensorboard_data_server-0.6.1-py3-none-manylinux2010_x86_64.whl (4.9 MB)
Collecting protobuf>=3.6.0
Using cached protobuf-3.18.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB)
Requirement already satisfied: wheel>=0.26 in /home/miranda9/miniconda3/envs/synthesis/lib/python3.9/site-packages (from tensorboard->ultimate-utils==0.2.0) (0.37.0)
Collecting markdown>=2.6.8
Using cached Markdown-3.3.4-py3-none-any.whl (97 kB)
Collecting grpcio>=1.24.3
Using cached grpcio-1.40.0-cp39-cp39-manylinux2014_x86_64.whl (4.3 MB)
Collecting absl-py>=0.4
Using cached absl_py-0.14.0-py3-none-any.whl (131 kB)
Requirement already satisfied: setuptools>=41.0.0 in /home/miranda9/miniconda3/envs/synthesis/lib/python3.9/site-packages (from tensorboard->ultimate-utils==0.2.0) (58.0.4)
Collecting cachetools<5.0,>=2.0.0
Using cached cachetools-4.2.2-py3-none-any.whl (11 kB)
Collecting rsa<5,>=3.1.4
Using cached rsa-4.7.2-py3-none-any.whl (34 kB)
Collecting pyasn1-modules>=0.2.1
Using cached pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
Collecting requests-oauthlib>=0.7.0
Using cached requests_oauthlib-1.3.0-py2.py3-none-any.whl (23 kB)
Collecting pyasn1<0.5.0,>=0.4.6
Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Collecting oauthlib>=3.0.0
Using cached oauthlib-3.1.1-py2.py3-none-any.whl (146 kB)
Collecting filelock
Using cached filelock-3.0.12-py3-none-any.whl (7.6 kB)
Collecting regex!=2019.12.17
Using cached regex-2021.8.28-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (759 kB)
Collecting sacremoses
Using cached sacremoses-0.0.45-py3-none-any.whl (895 kB)
Collecting huggingface-hub>=0.0.12
Using cached huggingface_hub-0.0.17-py3-none-any.whl (52 kB)
Collecting packaging
Using cached packaging-21.0-py3-none-any.whl (40 kB)
Collecting pyyaml>=5.1
Using cached PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl (630 kB)
Collecting tokenizers<0.11,>=0.10.1
Using cached tokenizers-0.10.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (3.3 MB)
Collecting click
Using cached click-8.0.1-py3-none-any.whl (97 kB)
Collecting sentry-sdk>=1.0.0
Using cached sentry_sdk-1.4.1-py2.py3-none-any.whl (139 kB)
Collecting docker-pycreds>=0.4.0
Using cached docker_pycreds-0.4.0-py2.py3-none-any.whl (9.0 kB)
Collecting promise<3,>=2.0
Using cached promise-2.3-py3-none-any.whl
Collecting yaspin>=1.0.0
Using cached yaspin-2.1.0-py3-none-any.whl (18 kB)
Collecting configparser>=3.8.1
Using cached configparser-5.0.2-py3-none-any.whl (19 kB)
Collecting GitPython>=1.0.0
Using cached GitPython-3.1.24-py3-none-any.whl (180 kB)
Collecting psutil>=5.0.0
Using cached psutil-5.8.0-cp39-cp39-manylinux2010_x86_64.whl (293 kB)
Collecting shortuuid>=0.5.0
Using cached shortuuid-1.0.1-py3-none-any.whl (7.5 kB)
Collecting subprocess32>=3.5.3
Using cached subprocess32-3.5.4-py3-none-any.whl
Collecting pathtools
Using cached pathtools-0.1.2-py3-none-any.whl
Collecting gitdb<5,>=4.0.1
Using cached gitdb-4.0.7-py3-none-any.whl (63 kB)
Collecting smmap<5,>=3.0.1
Using cached smmap-4.0.0-py2.py3-none-any.whl (24 kB)
Collecting termcolor<2.0.0,>=1.1.0
Using cached termcolor-1.1.0-py3-none-any.whl
Installing collected packages: urllib3, pyasn1, idna, charset-normalizer, smmap, six, rsa, requests, pyparsing, pyasn1-modules, oauthlib, cachetools, tqdm, termcolor, requests-oauthlib, regex, packaging, multidict, joblib, google-auth, gitdb, filelock, click, yaspin, yarl, werkzeug, tokenizers, threadpoolctl, tensorboard-plugin-wit, tensorboard-data-server, tenacity, subprocess32, shortuuid, sentry-sdk, scipy, sacremoses, pyyaml, pytz, python-utils, python-dateutil, psutil, protobuf, promise, pathtools, markdown, kiwisolver, huggingface-hub, grpcio, google-auth-oauthlib, GitPython, docker-pycreds, cycler, configparser, chardet, attrs, async-timeout, absl-py, wandb, transformers, torchtext, tensorboard, scikit-learn, progressbar2, plotly, pandas, networkx, matplotlib, lark-parser, dill, aiohttp, ultimate-utils
Running setup.py develop for ultimate-utils
Successfully installed GitPython-3.1.24 absl-py-0.14.0 aiohttp-3.7.4.post0 async-timeout-3.0.1 attrs-21.2.0 cachetools-4.2.2 chardet-4.0.0 charset-normalizer-2.0.6 click-8.0.1 configparser-5.0.2 cycler-0.10.0 dill-0.3.4 docker-pycreds-0.4.0 filelock-3.0.12 gitdb-4.0.7 google-auth-1.35.0 google-auth-oauthlib-0.4.6 grpcio-1.40.0 huggingface-hub-0.0.17 idna-3.2 joblib-1.0.1 kiwisolver-1.3.2 lark-parser-0.12.0 markdown-3.3.4 matplotlib-3.4.3 multidict-5.1.0 networkx-2.6.3 oauthlib-3.1.1 packaging-21.0 pandas-1.3.3 pathtools-0.1.2 plotly-5.3.1 progressbar2-3.53.3 promise-2.3 protobuf-3.18.0 psutil-5.8.0 pyasn1-0.4.8 pyasn1-modules-0.2.8 pyparsing-2.4.7 python-dateutil-2.8.2 python-utils-2.5.6 pytz-2021.1 pyyaml-5.4.1 regex-2021.8.28 requests-2.26.0 requests-oauthlib-1.3.0 rsa-4.7.2 sacremoses-0.0.45 scikit-learn-0.24.2 scipy-1.7.1 sentry-sdk-1.4.1 shortuuid-1.0.1 six-1.16.0 smmap-4.0.0 subprocess32-3.5.4 tenacity-8.0.1 tensorboard-2.6.0 tensorboard-data-server-0.6.1 tensorboard-plugin-wit-1.8.0 termcolor-1.1.0 threadpoolctl-2.2.0 tokenizers-0.10.3 torchtext-0.10.1 tqdm-4.62.3 transformers-4.10.3 ultimate-utils-0.2.0 urllib3-1.26.7 wandb-0.12.2 werkzeug-2.0.1 yarl-1.6.3 yaspin-2.1.0
(synthesis) miranda9~/type-parametric-synthesis $
非常神秘!
您应该可以使用pip install ultimate-utils 安装 uutils,但我认为问题是 pip install -e 问题...
【问题讨论】:
-
尝试
pip -v list查看冗余库指向的位置(如果可编辑,它们可能相同)