我已经在 Ubuntu 20.04 LTS 中安装了 Python 3.9。现在系统同时拥有Python 3.8和Python 3.9。
# which python
# which python3
/usr/bin/python3
# which python3.8
/usr/bin/python3.8
# which python3.9
/usr/bin/python3.9
# ls -alith /usr/bin/python3
12583916 lrwxrwxrwx 1 root root 9 Jul 19 2021 /usr/bin/python3 -> python3.8
Run Code Online (Sandbox Code Playgroud)
但该pip3命令仍会将所有内容安装到 Python 3.8 目录中。
# pip3 install --upgrade --find-links file:///path/to/directory <...>
Run Code Online (Sandbox Code Playgroud)
我想通过将符号链接 /usr/bin/python3 更新为 /usr/bin/python3.9 来更改默认的 pip3 行为。
怎么做?
# update-alternatives --set python3 /usr/bin/python3.9
This command will not work as expected.
Run Code Online (Sandbox Code Playgroud)
这是 pip3 信息:
# which pip3
/usr/bin/pip3 …Run Code Online (Sandbox Code Playgroud) 当前版本tflite-runtime是2.11.0:
https://pypi.org/project/tflite-runtime/
tflite-runtime这是下载到文件夹的测试tmp:
mkdir -p /tmp/test
cd /tmp/test
echo "tflite-runtime == 2.11.0" > ./test.txt
pip3 download -r ./test.txt
Run Code Online (Sandbox Code Playgroud)
这是错误:
ERROR: Could not find a version that satisfies the requirement tflite-runtime==2.11.0 (from versions: none)
ERROR: No matching distribution found for tflite-runtime==2.11.0
Run Code Online (Sandbox Code Playgroud)
这是 pip3 版本:
# pip3 --version
pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10)
Run Code Online (Sandbox Code Playgroud)
上面有什么问题pip3 download吗?为什么找不到最新版本?以及如何修复?
在 Ubuntu 22.04 上使用 Eclipse 2022-06/03 存在一些问题。
下面的 eclipse 图像使用的是这个版本:
启动画面未位于屏幕中央。
为什么eclipse不能把启动图片放在中间?这是eclipse的BUG还是与Ubuntu 22.04上缺少未知软件包有关?
这是getImgIds来自pycocotools:
pycocotools/coco.py:
def getImgIds(self, imgIds=[], catIds=[]):
'''
Get img ids that satisfy given filter conditions.
:param imgIds (int array) : get imgs for given ids
:param catIds (int array) : get imgs with all given cats
:return: ids (int array) : integer array of img ids
'''
imgIds = imgIds if _isArrayLike(imgIds) else [imgIds]
catIds = catIds if _isArrayLike(catIds) else [catIds]
if len(imgIds) == len(catIds) == 0:
ids = self.imgs.keys()
else:
ids = set(imgIds)
for i, …Run Code Online (Sandbox Code Playgroud)