[Seek Help] 【已解决】双击desktop文件exec没有运行当前用户下的python环境
Tofloor
poster avatar
风吹过的绿洲
deepin
2022-08-10 06:02
Author

截图_选择区域_20220809215327.png

我怀疑默认以root用户运行,而root用户下的python环境和自己用户下的python环境不一样。


![image.png](https://storage.deepin.org/thread/202208092159216212_image.png)
root@jay-PC:~# python3 -m pip install vosk srt -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting vosk
/usr/share/python-wheels/urllib3-1.24.1-py2.py3-none-any.whl/urllib3/connectionpool.py:849: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  Could not find a version that satisfies the requirement vosk (from versions: )
No matching distribution found for vosk
root@jay-PC:~# 

也尝试过,root下安装,安装失败。

而用户环境下早就装好了。
截图_选择区域_20220809215908.png

在用户环境下,命令行打开软件没问题,软件能正常加载python依赖包。

root环境下,因为包安装不了,直接双击desktop或者命令下都不行。

所以: 怎么让desktop以用户环境运行呢?

Reply Favorite View the author
All Replies
2 / 2
To page
安洛
deepin
2022-08-13 03:21
#21
hotime

哦哦学到了!另外:python默认是python2,所以得python3吧?

python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade pip

deepin默认情况下是的。我自己都将python链接到python3了。

Reply View the author
2 / 2
To page