AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-733256

cdahms's questions

Martin Hope
cdahms
Asked: 2023-08-28 04:05:31 +0800 CST

Wacom 数位板 - 如何将所有数位板仅映射到屏幕的一部分?

  • 6

假设我的屏幕如下所示:

在此输入图像描述

我是否可以更改设置,将 Wacom 数位板的所有活动区域映射到屏幕上我用红色绘制的区域(在本例中是 Google Jamboard 的可绘制区域)?

我检查了Settings-> Wacom Tablet,还检查了 Ubuntu 手册页的xsetwacom https://manpages.ubuntu.com/manpages/trusty/man1/xsetwacom.1.html,但我没有看到这样的设置。

显然,Wacom 软件的 Windows 版本具有此功能:
https://developer-support.wacom.com/hc/en-us/articles/9354476441623-How-can-I-map-my-Intuos-tablet-到-我的电脑显示器的一部分-

但这并没有多大帮助,因为我使用的是 Ubunu。如果重要的话,我正在使用 Ubuntu 20.04 或 22.04。有什么建议么?

tablet
  • 1 个回答
  • 23 Views
Martin Hope
cdahms
Asked: 2023-05-06 03:36:22 +0800 CST

pi 在 Ubuntu 计算器上?

  • 5

pi有没有办法在 Ubuntu 计算器上获取值?我希望这会起作用,但如您所见,它不起作用:

在此处输入图像描述

当然,我可以输入 3.14159 并且在 > 99% 的情况下都足够准确,但如果有实际的方法来获得 pi 那就太好了。

calculator
  • 2 个回答
  • 42 Views
Martin Hope
cdahms
Asked: 2021-08-20 10:48:28 +0800 CST

Ubuntu 18.04 试图加载错误的 vmlinuz 文件,如何修复?

  • 0

我有一台 2 TB M.2 HD 双启动的机器,使用 Ubuntu 20.04 和 18.04(由于遗留原因仍需要 18.04,请不要询问详细信息:)。

我刚刚对 20.04 进行了更新,现在如果不选择特殊选项,18.04 将无法启动。这是我在启动时通常的 grub 屏幕:

在此处输入图像描述

如果我选择Ubuntu 18.04我会得到这个:

在此处输入图像描述

如果改为在主启动菜单中选择Advanced options for Ubutnu 18.04.5 LTS (18.04) (on /dev/nvme0n1p2)我会得到以下信息:

在此处输入图像描述

如果我选择这些非恢复模式选项中的任何一个,一切都会启动并正常工作。

我不明白的是为什么通常的引导选项会寻找以 结尾的内核版本70?它已经不存在了!我怎样才能让它寻找存在的内核版本之一?

ls当我得到以下内容时,我做了更多的探索/boot:

$ ls -l
total 169176
-rw-r--r-- 1 root root   237757 Apr 16 07:44 config-5.4.0-73-generic
-rw-r--r-- 1 root root   237757 Jul 13 10:52 config-5.4.0-80-generic
-rw-r--r-- 1 root root   237757 Jul 23 05:56 config-5.4.0-81-generic
drwx------ 3 root root     4096 Dec 31  1969 efi
drwxr-xr-x 6 root root     4096 Aug 19 11:17 grub
-rw-r--r-- 1 root root 43261536 Jul 22 09:33 initrd.img-5.4.0-73-generic
-rw-r--r-- 1 root root 43267722 Jul 23 10:31 initrd.img-5.4.0-80-generic
-rw-r--r-- 1 root root 43266831 Aug 17 11:26 initrd.img-5.4.0-81-generic
-rw-r--r-- 1 root root   182704 Jan 28  2016 memtest86+.bin
-rw-r--r-- 1 root root   184380 Jan 28  2016 memtest86+.elf
-rw-r--r-- 1 root root   184840 Jan 28  2016 memtest86+_multiboot.bin
-rw------- 1 root root  4586616 Apr 16 07:44 System.map-5.4.0-73-generic
-rw------- 1 root root  4587397 Jul 13 10:52 System.map-5.4.0-80-generic
-rw------- 1 root root  4587874 Jul 23 05:56 System.map-5.4.0-81-generic
-rw------- 1 root root  9449728 Apr 16 07:44 vmlinuz-5.4.0-73-generic
-rw------- 1 root root  9453824 Jul 13 11:28 vmlinuz-5.4.0-80-generic
-rw------- 1 root root  9457920 Jul 23 05:59 vmlinuz-5.4.0-81-generic

所以再次以, 和vmlinuz结尾73,但不是那个 grub 似乎正在寻找的。我也检查过,它也有条目,但没有!grub 是从哪里来的?808170/boot/grub/grub.conf7380817070

根据其他一些帖子,我还尝试c从 grub 主菜单按进行终端会话,我找到了以下信息,但我不确定该怎么做,抱歉这张照片有点模糊:

在此处输入图像描述

如果可能的话,我不确定如何在此处输入命令来解决此问题。

我应该提到的另一件事是在执行高级启动选项以返回 Ubuntu 18.04 之后,我尝试过:

sudo apt-get update
sudo apt-get upgrade

和

sudo update-grub

希望这些能解决问题,但他们没有。建议??

-- 回复@heynnema --

这是您建议的命令的终端输出:

$ sudo update-initramfs -c -k 5.4.0-81-generic
[sudo] password for cdahms: 
update-initramfs: Generating /boot/initrd.img-5.4.0-81-generic
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8125a-3.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168fp-3.fw for module r8169

重新启动后结果与以前相同(与通常的 18.04 启动菜单选择相同的错误,仍然适用于高级选项选择)

-- 第二次回复@heynnema --

fdisk:

$ sudo fdisk -l
Disk /dev/loop0: 32.3 MiB, 33865728 bytes, 66144 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 704 KiB, 720896 bytes, 1408 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 243.9 MiB, 255762432 bytes, 499536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop3: 276 KiB, 282624 bytes, 552 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop4: 2.5 MiB, 2621440 bytes, 5120 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop5: 32.3 MiB, 33853440 bytes, 66120 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop6: 2.4 MiB, 2555904 bytes, 4992 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop7: 61.7 MiB, 64729088 bytes, 126424 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/nvme0n1: 1.9 TiB, 2048408248320 bytes, 4000797360 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 63850E58-ACD2-4B55-B5D5-29E46C830D03

Device              Start        End    Sectors   Size Type
/dev/nvme0n1p1       2048    1050623    1048576   512M EFI System
/dev/nvme0n1p2    1050624 2029461901 2028411278 967.2G Linux filesystem
/dev/nvme0n1p3 2029463552 4000796671 1971333120   940G Linux filesystem




Disk /dev/loop8: 65.1 MiB, 68259840 bytes, 133320 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop9: 548 KiB, 561152 bytes, 1096 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop10: 2.5 MiB, 2605056 bytes, 5088 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop11: 219 MiB, 229638144 bytes, 448512 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop12: 2.2 MiB, 2342912 bytes, 4576 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop13: 219 MiB, 229629952 bytes, 448496 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop14: 64.8 MiB, 67915776 bytes, 132648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop15: 548 KiB, 561152 bytes, 1096 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop16: 55.4 MiB, 58130432 bytes, 113536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop17: 55.5 MiB, 58134528 bytes, 113544 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop18: 61.8 MiB, 64770048 bytes, 126504 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

blkid:

$ sudo blkid
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"
/dev/loop6: TYPE="squashfs"
/dev/loop7: TYPE="squashfs"
/dev/nvme0n1: PTUUID="63850e58-acd2-4b55-b5d5-29e46c830d03" PTTYPE="gpt"
/dev/nvme0n1p1: UUID="B97B-4975" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="b1d40bc5-1bc0-490b-92d4-256bad74c673"
/dev/nvme0n1p2: UUID="cdc92bbb-f4d8-4a31-9cbf-5215632adb49" TYPE="ext4" PARTUUID="3079da12-a09d-4a1a-a21a-61af34810c23"
/dev/nvme0n1p3: UUID="93b02138-35e3-4446-a2b9-e16cf6c22786" TYPE="ext4" PARTUUID="51df7e8c-fa57-4275-9348-27902134ee6a"
/dev/loop8: TYPE="squashfs"
/dev/loop9: TYPE="squashfs"
/dev/loop10: TYPE="squashfs"
/dev/loop11: TYPE="squashfs"
/dev/loop12: TYPE="squashfs"
/dev/loop13: TYPE="squashfs"
/dev/loop14: TYPE="squashfs"
/dev/loop15: TYPE="squashfs"
/dev/loop16: TYPE="squashfs"
/dev/loop17: TYPE="squashfs"
/dev/loop18: TYPE="squashfs"

根据这篇文章的答案之一,如何从终端检测我的磁盘是使用 GPT 还是 MBR?我做了:

$ sudo ls
 aws                  IntelliScan_Haze_Class_005   pycharm
 awscliv2.zip             IntelliScan_Images_005       rotated_IntelliScan_Images_007
 Desktop              IntelliScan_Images_006       snap
 Documents            IntelliScan_Images_007       temp
 Downloads            minicom.log          temp2.txt
 Downloads2           Music            Templates
 Dropbox             'Nala devices'        temp.txt
 eclipse              Nala_PVT3_2mm_lens_haze      Videos
 examples.desktop         Pictures            'Volumetric Dummy Devices.txt'
 IntelliScan_Haze_Class_001   Public               workspace-apps
 IntelliScan_Haze_Class_002   PVT3_haze            workspace-prod
 IntelliScan_Haze_Class_003   PVT4
 IntelliScan_Haze_Class_004  'PVT4 IMEIs.txt'

然后:

$ sudo fdisk -l | grep -B 5 Disklabel

Disk /dev/nvme0n1: 1.9 TiB, 2048408248320 bytes, 4000797360 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt

所以看来我正在使用 GPT 格式

-- 第三次回复@heynnema --

是的,我确实使用Grub Customizer过,那是不是搞砸了?我听说它可以做到这一点,但我以前从未遇到过问题。这是我的ls -al /etc/grub.d:

$ ls -al /etc/grub.d
total 100
drwxr-xr-x   5 root root  4096 Aug 19 11:00 .
drwxr-xr-x 140 root root 12288 Aug 19 10:32 ..
-rwxr-xr-x   1 root root 10046 Jul 30  2020 00_header
-rwxr-xr-x   1 root root  6258 Jul 20  2020 05_debian_theme
-rwxr-xr-x   1 root root   914 May 23 22:55 10_linux_proxy
-rwxr-xr-x   1 root root   221 May 23 22:55 40_custom_proxy
-rwxr-xr-x   1 root root   914 May 23 22:55 41_linux_proxy
-rwxr-xr-x   1 root root 11298 Jul 30  2020 44_linux_xen
-rwxr-xr-x   1 root root  1992 Jan 28  2016 45_memtest86+
-rwxr-xr-x   1 root root  1539 May 23 22:55 46_os-prober_proxy
-rwxr-xr-x   1 root root  1418 Jul 30  2020 47_uefi-firmware
-rwxr-xr-x   1 root root   285 May 23 22:55 48_custom_proxy
-rwxr-xr-x   1 root root   216 Jul 30  2020 49_custom
drwxr-xr-x   4 root root  4096 May 23 22:55 backup
drwxr-xr-x   2 root root  4096 May 23 22:55 bin
drwxr-xr-x   2 root root  4096 May 23 22:55 proxifiedScripts
-rw-r--r--   1 root root   483 Jul 30  2020 README
-rw-r--r--   1 root root   272 May 23 22:55 .script_sources.txt

-- 对@heynnema 的第四次回复 -- grep -i 5.4.0-70 /etc/grub.d/*:

$ grep -i 5.4.0-70 /etc/grub.d/*
/etc/grub.d/10_linux_proxy:-'SUBMENU' as 'Advanced options for Ubuntu'{-'Advanced options for Ubuntu'/*, -'Advanced options for Ubuntu'/'Ubuntu, with Linux 5.4.0-73-generic'~408f07b7e0dd8d620374c5b681855861~, -'Advanced options for Ubuntu'/'Ubuntu, with Linux 5.4.0-73-generic (recovery mode)'~003de087994ae2af14e29d21bf9905b2~, -'Advanced options for Ubuntu'/'Ubuntu, with Linux 5.4.0-72-generic'~c5a297cf454d7588afd791e38e600c79~, -'Advanced options for Ubuntu'/'Ubuntu, with Linux 5.4.0-72-generic (recovery mode)'~fdd81b462724bdc5fe27e5506ee615f4~, -'Advanced options for Ubuntu'/'Ubuntu, with Linux 5.4.0-70-generic'~6f6c570f06cb15f97ea26de817f5f40a~, -'Advanced options for Ubuntu'/'Ubuntu, with Linux 5.4.0-70-generic (recovery mode)'~6b0d22eb9c2641ea1add550c2162c631~}
/etc/grub.d/41_linux_proxy:+'SUBMENU' as 'Advanced options for Ubuntu'{+'Advanced options for Ubuntu'/*, +'Advanced options for Ubuntu'/'Ubuntu, with Linux 5.4.0-73-generic'~408f07b7e0dd8d620374c5b681855861~, +'Advanced options for Ubuntu'/'Ubuntu, with Linux 5.4.0-73-generic (recovery mode)'~003de087994ae2af14e29d21bf9905b2~, +'Advanced options for Ubuntu'/'Ubuntu, with Linux 5.4.0-72-generic'~c5a297cf454d7588afd791e38e600c79~, +'Advanced options for Ubuntu'/'Ubuntu, with Linux 5.4.0-72-generic (recovery mode)'~fdd81b462724bdc5fe27e5506ee615f4~, +'Advanced options for Ubuntu'/'Ubuntu, with Linux 5.4.0-70-generic'~6f6c570f06cb15f97ea26de817f5f40a~, +'Advanced options for Ubuntu'/'Ubuntu, with Linux 5.4.0-70-generic (recovery mode)'~6b0d22eb9c2641ea1add550c2162c631~}
grep: /etc/grub.d/backup: Is a directory
grep: /etc/grub.d/bin: Is a directory
grep: /etc/grub.d/proxifiedScripts: Is a directory

似乎 5.4.0-70 在 grub.d 中!也许这就是问题所在?

cat /etc/fstab:

$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/nvme0n1p2 during installation
UUID=cdc92bbb-f4d8-4a31-9cbf-5215632adb49 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=B97B-4975  /boot/efi       vfat    umask=0077      0       1
/swapfile                                 none            swap    sw              0       0

-- 第 5 次回复@heynnema --

这是常规 Ubuntu 18.04 菜单项的 Grub Customizer 编辑屏幕:

在此处输入图像描述

我不明白这个 b/c-73是不是在这里-70?!?!

-- 第六次回复@heynnema --

主 Grub 定制器屏幕:

在此处输入图像描述

boot
  • 1 个回答
  • 396 Views
Martin Hope
cdahms
Asked: 2021-08-05 09:50:47 +0800 CST

Ubuntu 上的 FreeCAD - 如何旋转/平移?

  • 1

我刚刚在 Ubuntu 20.04 上安装了 FreeCAD 并打开了一个 .stp 文件,这似乎是有效的。

在尝试解决如何旋转/平移时,我在 Google 上发现了各种页面(例如https://wiki.freecadweb.org/Manual:Navigating_in_the_3D_view),其中列出了人们期望的通常建议(鼠标左键的一些组合, Ctrl、Alt、Shift 和 Windows 键)。这些都不起作用。

我记得在使用其他一些程序时,关于 Ubuntu 抢占了某些组合键的使用,这使得这种类型的功能不适用于某些程序。有没有解决的办法?例如,在谷歌地图中,​​按住 Ctrl + 鼠标左键会按预期旋转,这与在 Windows 中相同,所以我知道如果开发人员做某些事情,它是可以工作的。有没有办法在 Ubuntu 上的 FreeCAD 中解决这个限制,或者我做错了什么?如果视图无法旋转/平移,FreeCAD 就没有多大用处。

20.04
  • 1 个回答
  • 241 Views
Martin Hope
cdahms
Asked: 2021-05-22 18:35:35 +0800 CST

如何在 Ubuntu 20.04 上下载 Waymo 开放数据集?

  • 1

我正在尝试在 Ubuntu 20.04 上下载 Waymo 开放数据集,但我遇到了一个又一个问题。首先我去了这里:

https://waymo.com/open/download/

输入我的名字等,然后在“感知数据集”下,我选择了 v1.2“个人文件”链接,该链接导致:

https://console.cloud.google.com/storage/browser/waymo_open_dataset_v_1_2_0_individual_files

我之前使用过各种云服务,但之前没有使用过 Google Cloud Platform。我检查了所有框,然后选择“下载”:

在此处输入图像描述

出现一个弹出框,指示输入此命令:

gsutil -m cp -r \
  "gs://waymo_open_dataset_v_1_2_0_individual_files/domain_adaptation/" \
  "gs://waymo_open_dataset_v_1_2_0_individual_files/testing/" \
  "gs://waymo_open_dataset_v_1_2_0_individual_files/training/" \
  "gs://waymo_open_dataset_v_1_2_0_individual_files/validation/" \
  .

我运行了命令,得到一个错误“gsutil notrecognized”,所以我做了:

sudo apt-get install gsutil

然后再次运行推荐的命令,我得到了这个错误:

Unknown option: m
No command was given.
Choose one of -b, -d, -e, or -r to do something.

经过一番谷歌搜索后,我发现了这篇文章:

https://stackoverflow.com/questions/61417140/installing-gcloud-gsutil-on-ubuntu-18

所以我做了:

echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list

curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -

sudo apt-get update

sudo apt-get install google-cloud-sdk

现在,当我运行上面推荐的命令时,我得到:

$ gsutil -m cp -r \
>   "gs://waymo_open_dataset_v_1_2_0_individual_files/domain_adaptation/" \
>   "gs://waymo_open_dataset_v_1_2_0_individual_files/testing/" \
>   "gs://waymo_open_dataset_v_1_2_0_individual_files/training/" \
>   "gs://waymo_open_dataset_v_1_2_0_individual_files/validation/" \
>   .
ServiceException: 401 Anonymous caller does not have storage.objects.get access to the Google Cloud Storage object.
CommandException: 1 file/object could not be transferred.

此数据集是公开的,因此不需要密码或等效项。有没有其他人使用 Ubuntu 成功下载了这个数据集?我已经下载了其他自动驾驶汽车数据集(Lyft Level 5、Kitti 等),并且还在同一台计算机上使用了 AWS,没有遇到任何问题。我究竟做错了什么?

20.04
  • 1 个回答
  • 883 Views
Martin Hope
cdahms
Asked: 2020-12-02 18:17:00 +0800 CST

Ubuntu 20.04 中的 python-is-python3 包 - 它是什么以及它实际上做了什么?

  • 68

已经使用 Ubuntu 18.04 几年了,并且读到 Python 2 已从 Ubuntu 20.04 中删除,我期待使用命令pythonorpip而不是python3or pip3。所以今天我第一次尝试了Ubuntu 20.04,发现:

$ python --version

Command 'python' not found

$ python3 --version
Python 3.8.5

我很惊讶,在进一步调查后发现了以下关于包裹的信息python-is-python3:

https://packages.ubuntu.com/focal/python-is-python3

https://launchpad.net/ubuntu/focal/+package/python-is-python3

如何使“python”程序命令执行 Python 3?

这 3 个链接的中间是最具描述性的,但没有一个特别清楚如果要在 Ubuntu 20.04 安装上运行是什么python-is-python3/做什么以及后果的全部范围。sudo apt-get install python-is-python3

以下是我的一些问题python-is-python3:

  1. 是python-is-python3Ubuntu/Canonical 专有的吗?如果是这样,其他 Linux 发行版python-is-python3是否也使用或其他一些发行版是否有类似的等价物?

  2. 我收集如果我python-is-python3要从命令提示符运行,那么我可以使用命令python而不是python3. 首先有人可以确认这一点,其次,是否也适用于pip,即pip代替pip3?

  3. 上面的 launchpad.net 链接提到了符号链接的创建。python-is-python3真的只是创建一个符号链接吗?为这样一个简单的目的引入一个包似乎很奇怪。此外,如果此软件包随后被卸载(i.e. sudo apt --purge remove python-is-python3),这是否会删除符号链接?

  4. 现在还有常用的 Python 2 包吗?我想不出任何临时的。

  5. 有没有人因为事先没有意识到的原因而跑了python-is-python3,后来又后悔了?

  6. 似乎运行的好处python-is-python3是不必在 Python 命令的末尾添加 3,但缺点是你会有一个非标准的 Ubuntu 设置,这是对python-is-python3优点/缺点的公平总结吗?

python python3 20.04
  • 2 个回答
  • 65550 Views
Martin Hope
cdahms
Asked: 2019-12-23 07:12:12 +0800 CST

Ubuntu 18.04 - 双击打开 jupyter 笔记本?

  • 5

有没有办法配置 Ubuntu 18.04 以从图形文件浏览器中双击打开 Jupyter Notebooks?

关于这个主题有 2 个突出的 Stack Overflow 帖子:

https://stackoverflow.com/questions/30953227/double-click-to-open-an-ipython-notebook

https://stackoverflow.com/questions/30953227/double-click-to-open-an-ipython-notebook/30955613

但是这里的大多数答案都与 MacOS 相关,而与 Linux 相关的少数答案在 Ubuntu 18.04 上似乎对我不起作用。

与上面我尝试的完全不同的是制作一个桌面文件:

cd ~/.local/share/applications
gedit jupyter_notebook.desktop

在 Gedit 我输入了这个:

[Desktop Entry]
Comment=
Terminal=false
Name=JupyterNotebook
Exec="jupyter notebook" %f
Type=Application

但这没有用。双击 .ipynb 文件仍会在 Chrome 中打开它并显示 .json 内容,而不是将其作为笔记本运行。

有没有人真正得到这个功能来与 Ubuntu 18.04 一起工作?

python3 jupyter
  • 1 个回答
  • 2032 Views
Martin Hope
cdahms
Asked: 2019-11-09 11:32:57 +0800 CST

Ubuntu 18.04 - 如何仅禁用内置网络摄像头(即启用任何其他附加的网络摄像头)

  • 1

我正在使用一台运行 Ubuntu 18.04 并带有一个内置网络摄像头(集成到显示器)的笔记本电脑,并且我正在连接多个其他网络摄像头。

我只想禁用内置网络摄像头,并继续允许我选择连接的其他摄像头。在 Ubuntu 18.04 中是否有一种优雅的方法可以做到这一点?

我可以在此主题上找到的所有当前信息都建议sudo modprobe -r uvcvideo并sudo modprobe uvcvideo暂时禁用和启用网络摄像头并进行编辑/etc/modprobe.d/blacklist.conf以在重新启动后永久禁用网络摄像头,但这两种方法似乎都可以打开或关闭所有网络摄像头,不仅是内置网络摄像头或某个指定的网络摄像头。

webcam 18.04
  • 1 个回答
  • 1919 Views
Martin Hope
cdahms
Asked: 2019-02-16 23:46:57 +0800 CST

Ubuntu 18.04 - 无法找到软件包 qt-sdk

  • 7

我正在尝试关注这篇文章

如何在 C++ 的 Ubuntu 16.04.2 [LTS] 上安装点云库 v1.8 (pcl-1.8.0)?

但是,我使用的是 Ubuntu 18.04 而不是 16.04。

如果我在 18.04 上执行此命令:

sudo apt-get install qt-sdk

我得到:

Unable to locate package qt-sdk

根据此链接:

https://packages.ubuntu.com/search?keywords=qt

qt-sdk 似乎是 14.04 和 16.04 的软件包,但不再是 Ubuntu 18.04 的软件包。任何人都可以建议 18.04 等效版本,以便我可以继续在上面链接的帖子中安装 PCL 吗?

apt qt
  • 2 个回答
  • 12054 Views
Martin Hope
cdahms
Asked: 2018-04-12 10:45:11 +0800 CST

Ubuntu 18.04 LTS 是否仍支持 Upstart 还是我们必须更改为 systemd?

  • 18

标题几乎说明了一切,我知道由于 Ubuntu 15.04 systemd 是默认的服务管理工具,但是如果我们愿意,我们仍然可以使用 Upstart 和 18.04 吗?

如果我们仍然可以将 Upstart 与 Ubuntu 18.04 一起使用,Canonical 是否宣布了一个特定版本,其中 Upstart 将不再工作,或者我们自己尝试将 Upstart 与当前/未来的 Ubuntu 版本一起使用,直到它在特殊案例?

除了 systemd 之外,Ubuntu 18.04 还会附带 Upstart,还是我们必须单独安装 Upstart?

在有人将此标记为重复之前,我意识到这篇文章:

新贵或 Systemd

声明 Upstart 一直使用到 14.10,现在 systemd 是默认设置,但我的问题是,即使它不是默认设置,我们是否仍然可以将 Upstart 与 18.04 一起使用。

upstart systemd 18.04
  • 1 个回答
  • 19334 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve