我已经尝试并再次尝试正确安装 Pycharm 的软件包。我对 Python2.7 和 Python3 都使用了 pip,并且我尝试使用 tar 文件。但是 Pycharm 并没有检测到这些模块,即使它们在 Pycharm 之外工作。我该怎么办?
SyntheticHuman's questions
我正在尝试创建一个调度程序。基本上,我希望它的工作方式是您可以选择一个选项来从您的日程安排中添加或删除一个项目,或者查看您今天的日程安排。当您选择添加一个项目时,您向它提供信息,并将其保存到一个文本文件中。我想这样做,以便当您查看日程安排时,它会打印与今天日期相对应的任何行。有没有办法做到这一点?
我想为自定义命令添加选项。我通过将 .sh 文档放入 /bin 来创建我的命令。是否可以在我的代码中添加“-x”选项?(即自定义命令-c)
我有一个 Realtek 互联网棒,我做了很多恶作剧来安装它,它运行得非常好。但是,每次我重新启动计算机时,它都会自动尝试连接 Lite-On 以太网。即使我手动将其关闭,它似乎也随机尝试重新打开 Lite-On 以太网。当然,它无法连接,因为我的电脑没有插入以太网电缆,所以它不断发送“Lite-On 以太网连接失败”的消息,真的很烦人。有没有办法让它自动关闭?
结果lsusb
:
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 003: ID 045e:00f7 Microsoft Corp. LifeCam VX-1000
Bus 007 Device 002: ID 0d8c:0012 C-Media Electronics, Inc. USB Audio Device
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 003: ID 413c:3012 Dell Computer Corp. Optical Wheel Mouse
Bus 006 Device 002: ID 045e:00b0 Microsoft Corp. Digital Media Pro Keyboard
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0bda:0811 Realtek Semiconductor Corp. 802.11ac WLAN Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
结果lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
结果ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp3s2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
link/ether 00:00:b5:94:7b:1b brd ff:ff:ff:ff:ff:ff
3: enp0s25: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 00:1a:a0:d2:a8:0f brd ff:ff:ff:ff:ff:ff
4: wlxe84e06562df0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 2312 qdisc mq state UP group default qlen 1000
link/ether e8:4e:06:56:2d:f0 brd ff:ff:ff:ff:ff:ff
inet 192.168.40.121/24 brd 192.168.40.255 scope global dynamic noprefixroute wlxe84e06562df0
valid_lft 23363sec preferred_lft 23363sec
inet6 fe80::e6d0:b064:844f:59b9/64 scope link noprefixroute
valid_lft forever preferred_lft forever
5: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 52:54:00:d1:df:76 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
6: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel master virbr0 state DOWN group default qlen 1000
link/ether 52:54:00:d1:df:76 brd ff:ff:ff:ff:ff:ff
因此,我计划尽快获得 SSD 卡并将其用作启动驱动器,因为我听说这可以使您的计算机启动速度更快。我还想尝试将我的旧硬盘作为辅助存储驱动器。有人可以向我推荐一个好的程序来将引导数据传输到 SDD 上吗?
编辑:我想尝试保留当前安装的 Ubuntu,然后将其移至新的 SSD 卡。
我最近在一台相当旧的计算机上安装了 Ubuntu,试图赋予它新的生命。过了一会儿,它开始经常冻结,无论何时冻结,我都必须进行硬重启。可能只是因为它是一台非常旧的计算机,但我想知道是否有什么办法可以解决这个问题。
这台计算机是 Optiplex 755,至少有 5 年的历史,可能更老。它安装了 ubuntu 20.04。这是我得到的规格
sudo dmidecode -t4 | less
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.5 present.
Handle 0x0400, DMI type 4, 40 bytes
Processor Information
Socket Designation: CPU
Type: Central Processor
Family: Core 2 Duo
Manufacturer: Intel
ID: FB 06 00 00 FF FB EB BF
Signature: Type 0, Family 6, Model 15, Stepping 11
Flags:
FPU (Floating-point unit on-chip)
VME (Virtual mode extension)
DE (Debugging extension)
PSE (Page size extension)
TSC (Time stamp counter)
MSR (Model specific registers)
PAE (Physical address extension)
MCE (Machine check exception)
CX8 (CMPXCHG8 instruction supported)
APIC (On-chip APIC hardware supported)
SEP (Fast system call)
MTRR (Memory type range registers)
PGE (Page global enable)
MCA (Machine check architecture)
CMOV (Conditional move instruction supported)
PAT (Page attribute table)
PSE-36 (36-bit page size extension)
CLFSH (CLFLUSH instruction supported)
DS (Debug store)
ACPI (ACPI supported)
MMX (MMX technology supported)
FXSR (FXSAVE and FXSTOR instructions supported)
SSE (Streaming SIMD extensions)
SSE2 (Streaming SIMD extensions 2)
SS (Self-snoop)
HTT (Multi-threading)
TM (Thermal monitor supported)
PBE (Pending break enabled)
Version: Not Specified
Voltage: 1.2 V
External Clock: 1066 MHz
Max Speed: 5200 MHz
Current Speed: 2400 MHz
Status: Populated, Enabled
Upgrade: Socket LGA775
L1 Cache Handle: 0x0700
所以,我有一本关于 Python 的书,它要我从这个网站下载 python shell: www.python.org/downloads/source
我不知道怎么做。有人可以帮忙吗?
所以,我是 Ubuntu 20.04 的新用户,我一直在尝试弄清楚如何制作自己的命令。我一直在尝试使用一系列 if-then 语句来创建一个命令,以弄清楚它们是如何工作的,但我一直遇到同样的错误。这是代码:
echo "Would you like to see the secret? (Y/N)"
read AFFIRM
if [$AFFIRM == Y]; then
echo "Alright, but first I need to ask a few questions. Ready? (Y/N)"
read AFFIRM2
if [$AFFIRM2 == Y]; then
echo "Great. First, what is the name of this computer?"
read COMNAME
if [$COMNAME == thesynthetichuman -o $COMNAME == Computer X]; then
echo "Correct! Next question: What was the name of the first user on this computer?
read USERNAME
if [$USERNAME == synthetichuman]; then
echo "Correct again! Last question: What is your favorite color?"
read FAVCOLOR
echo $FAVCOLOR >> " eh? Nice. Here is the secret!
//ascii art
?IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII????????????IIIIIIIIIIIIIIIIIIIIIIIIIIIIIII?+++
?IIIIIIIIIIIIIIIIIIIIIIIIIII????++++++++++++++????IIIIIIIIIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIIIIIII?++++++??????????????++++++?IIIIIIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIIIIII?+++???????????????????????++IIIIIIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIIIIII?+??????????????????????????+?IIIIIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIIIIII?+??????????????????????????+?IIIIIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIIIIII?+??????++??????????++??????+?IIIIIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIIIIII?+??????++??????????++??????+?IIIIIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIIIIII?+??????++??????????++??????+?IIIIIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIIIIII++??????++??????????++??????+?IIIIIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIIIIII++??????++??????????++??????+?IIIIIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIIIIII++??????++??????????++??????++IIIIIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIIIIII++??????++??????????++??????++IIIIIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIIIIII++??????++??????????++??????++IIIIIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIIIIII++??????++??????????++??????++IIIIIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIIIIII++??????++??????????++??????++IIIIIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIIIIII++??????++??????????++??????+?IIIIIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIIIIII?+??????????????????????????+?IIIIIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIIIIIII+++??????????????????????+++IIIIIIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIIIIIII?+++++++????????????+++++++IIIIIIIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIIIIIIIIIII???++++++++++++++???IIIIIIIIIIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII+++++++++++?IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII+????????++?IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII+++++++++++?IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII+++++++++++?IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIII?I???III?????+++??????+++?????????????IIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIII?++++++++++++++++++++++++++++++++++++++++++++?IIIIIIIIIIIIIII+++
?IIIIIIIIIIIII??++??++????????????????????????++????????++??++??IIIIIIIIIIIII+++
?IIIIIIIIIIII+??????+???????????????????????+?++?????????+????+++IIIIIIIIIIII+++
?IIIIIIIIIII?+++????+???????++++??++++????????+++????????+????+++?IIIIIIIIIII+++
?IIIIIIIIIII+++++???+???????++++++++++????????+++????????+??++??+?IIIIIIIIIII+++
?IIIIIIIIIII+???+++++?????+++???++???+++????????+????????++++???+?IIIIIIIIIII+++
?IIIIIIIIIII+?????+++???????+???++???+??????????+????????+++????+?IIIIIIIIIII+++
?IIIIIIIIIII+++++???+????????+++??+++???????????+???????++???++++?IIIIIIIIIII+++
?IIIIIIIIIII+????+++++????????++++++????????+???+?++????+++++???++IIIIIIIIIII+++
?IIIIIIIIIII+???????++??????????++??????????????+???????++??????++IIIIIIIIIII+++
?IIIIIIIIIII+???????++++??????????????????????+++?????+++???????+?IIIIIIIIIII+++
?IIIIIIIIIII++++?????+??+?????????????????????+++???+++++?????+++?IIIIIIIIIII+++
?IIIIIIIIIII+?+++????+II?++++++???????????????+++++++?II+???++??++IIIIIIIIIII+++
?IIIIIIIIIII+?????++++IIII++++++++++++++++++++++++IIIIII++??????++IIIIIIIIIII+++
?IIIIIIIIIII++??????++IIII+++?????????????++++++++IIIIII+?????+++?IIIIIIIIIII+++
?IIIIIIIIIII+++++????+IIII+++++++????????????????+IIIIII+???+++++?IIIIIIIIIII+++
?IIIIIIIIIII+???++???+IIII+++?++++++++++++++++++++IIIIII+?+++???++IIIIIIIIIII+++
?IIIIIIIIIII??????++++IIII++??????????++++++++++++IIII??++++?????IIIIIIIIIIII+++
?IIIIIIIIIIIII??I???++IIII++++???????????????????+IIII??++???IIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIII?IIII++????????++++++++++++++IIIIII?IIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIIIIIIII+++????????????????????+IIIIIIIIIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIIIIIIII++++++++??????????????++IIIIIIIIIIIIIIIIIIIIIIIIIII+++
?IIIIIIIIIIIIIIIIIIIIIIIII++?????+++++++++++++++++IIIIIIIIIIIIIIIIIIIIIIIIIII+++
+?????????????????????????+++????????+++++++++??++???????????????????????????+++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
GlassGiant.com"
else
echo "Wrong!"
fi
else
echo "Wrong!"
fi
elif [$AFFIRM == N]; then
echo "Okay then. Bye!"
else
echo "Look, I had very specific instructions. Why did you ignore them? Y or N. That is it. Come on."
fi
elif [$AFFIRM == N]; then
echo "Okay then. Bye!"
else
echo "Look, I had very specific instructions. Why did you ignore them? Y or N. That is it. Come on." // I seem to be getting "unexpected EOF while looking for matching `"'" errors on lines like this.
fi
echo "Bye!"
//syntax error: unexpected end of file???
我很困惑。EOF 错误出现在看似随机的行上,语法错误无论如何都会出现。我不明白如何修复错误,到目前为止我所有的谷歌搜索都是徒劳的。有人可以帮忙吗?