添加spyder(通过PIP安装)的图标到收藏夹

本操作是在Ubuntu 20.04 下

cd /usr/share/applications
sudo gedit spyder.desktop
 
然后把下列复制到gedit中
 
[Desktop Entry]
Encoding=UTF-8
Name=Spyder3
Comment=The Python IDE
Exec=/usr/local/bin/spyder  ''spyder 路径
Icon=/home/你的用户名/spyder3.png  ‘’下载图片的路径
StartupNotify=True
Terminal=False
Categories=Development;Science;IDE;Qt;
Type=Application
StartupNotify=True
MimeType=text/x-python;
X-AppStream-Ignore=True

然后搜索spyder

在Linux系统中使用Flatpak命令安装Scratch的方法

如果你的Linux操作系统支持Flatpak命令安装软件,那么可以使用Flatpak命令来安装Scratch,以下是具体方法。
使用Flatpak命令来安装Scratch

1、如果你的系统还没有安装Flatpack包管理器,请运行以下命令(以Ubuntu 20.04系统为例):

sudo apt-get update

sudo apt install flatpak
2、从Flatpak的Flathub仓库安装,运行以下命令:

flatpak remote-add –if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

flatpak install flathub edu.mit.Scratch

注:当前安装的版本为3.6.0。

3、安装完成后可运行以下命令运行:

flatpak run edu.mit.Scratch

注:可运行flatpak info edu.mit.Scratch命令查看相关的信息,返回如下信息即表示安装成功了:

Scratch – Create stories, games, and animations, share with others around the

world

ID: edu.mit.Scratch

Ref: app/edu.mit.Scratch/x86_64/stable

Arch: x86_64

Branch: stable

Version: 3.6.0

License: BSD-3-Clause

Origin: flathub

Collection: org.flathub.Stable

Installation: system

Installed: 513.0 MB

Runtime: org.freedesktop.Platform/x86_64/19.08

Sdk: org.freedesktop.Sdk/x86_64/19.08

Commit: be95cc888f17693303a1b56392c90b1915965c828b160023cb66c2bfffb75e53
Parent: 123e220a8e8392828b36807fec7ae55de9497d64054bf74e4847f464b4ce1123
Subject: Add –device=all for webcam access (64e7093d)
Date: 2020-06-15 05:11:25 +0000

Ubuntu中安装NVIDIA显卡驱动

a. ubuntu 18.04默认安装了第三方开源的驱动程序nouveau,安装nvidia显卡驱动首先需要禁用nouveau,不然会碰到冲突的问题,导致无法安装nvidia显卡驱动。

编辑文件blacklist.conf

sudo vim /etc/modprobe.d/blacklist.conf

安装或使用vi

在文件最后部分插入以下两行内容

blacklist nouveau
 
options nouveau modeset=0

更新系统

sudo update-initramfs -u

没有信息显示,说明nouveau已被禁用,接下来可以安装nvidia的显卡驱动。

2. 在英伟达的官网上查找你自己电脑的显卡型号然后下载相应的驱动。
3. 在ubuntu下按ctrl+alt+f6进入命令行界面,(进入命令行的方式可能有所不同,)

然后在命令行界面下输入:

sudo service lightdm stop      //这个是关闭图形界面,不执行会出错。(执行该语句时提示no lightdm service loaded ,跳过即可)

然后卸载掉原有驱动:

sudo apt-get remove nvidia-*  (若安装过其他版本或其他方式安装过驱动执行此项)

4.

给驱动run文件赋予执行权限:

sudo chmod  a+x NVIDIA-Linux-x86_64-版本号.run

安装:

sudo ./NVIDIA-Linux-x86_64-410.78.run -no-x-check -no-nouveau-check -no-opengl-files //只有禁用opengl这样安装才不会出现循环登陆的问题

no-x-check:安装驱动时关闭X服务

-no-nouveau-check:安装驱动时禁用nouveau

-no-opengl-files:只安装驱动文件,不安装OpenGL文件
出现找不到cc文件的问题,要执行下面的语句,否则安装完成,建立软连接也无法找到cc文件

sudo apt-get install gcc
sudo apt-get install g++
sudo apt-get install make

The distribution-provided pre-install script failed! Are you sure you want to continue? 选择 yes 继续。
Would you like to register the kernel module souces with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later? 选择 No 继续。
问题没记住,选项是:install without signing
问题大概是:Nvidia’s 32-bit compatibility libraries? 选择 No 继续。
Would you like to run the nvidia-xconfigutility to automatically update your x configuration so that the NVIDIA x driver will be used when you restart x? Any pre-existing x confile will be backed up. 选择 Yes 继续

这些选项如果选择错误可能会导致安装失败,没关系,只要前面不出错,多尝试几次就好。

挂载Nvidia驱动:

modprobe nvidia

检查驱动是否安装成功:

nvidia-smi