运行python却弹出Microsoft Store

今天安装好python之后,我在cmd中输入python,但是并没有运行python,而是弹出了Microsoft Store,并跳转到python的安装下载界面。

image-20220506230809031

然后我查找了一下,居然有两个python:

1
2
3
4
5
6
7
D:\Desktop\test\CMD\phone>python

D:\Desktop\test\CMD\phone>where python
C:\Users\HellloWorld\AppData\Local\Microsoft\WindowsApps\python.exe
C:\Users\HellloWorld\AppData\Local\Programs\Python\Python310\python.exe

D:\Desktop\test\CMD\phone>

解决方案

打开设置,进入应用执行别名,关掉python.exe即可。

阅读全文 »

安装Chocolatey

1
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

未完待续

参考资料

https://chocolatey.org/install
https://sspai.com/post/55309
https://juejin.cn/post/6994715287178182693
https://zhuanlan.zhihu.com/p/53421288
https://zhuanlan.zhihu.com/p/42441423
https://www.jianshu.com/p/a1ba81746fe8

Scrcpy.exe命令详解

  • 指定连接到192.168.10.4:5555的手机
  • 启动镜像时关闭手机屏幕
  • 进制手机休眠
  • 镜像最大高度为768
  • 镜像标题设置为xxx
  • 镜像永远置顶
1
scrcpy.exe -s 192.168.10.4:5555 --turn-screen-off --stay-awake -m 768 --window-title xxx --always-on-top
阅读全文 »

文件编码转换命令iconv

iconv可以给文件转换编码

帮助文档tldr iconv

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
18190@DESKTOP-SH3MQPI MINGW64 /g/Blog/blog_new (master)
$ tldr iconv

iconv

Converts text from one encoding to another.
More information: https://manned.org/iconv.

- Convert file to a specific encoding, and print to stdout:
iconv -f from_encoding -t to_encoding input_file

- Convert file to the current locale's encoding, and output to a file:
iconv -f from_encoding input_file > output_file

- List supported encodings:
iconv -l