无法使用 pip 安装

无法使用 pip 安装

我尝试pip install几乎所有模块时都会出现此错误。我chime也尝试了其他几个模块

pip install playsound
bash: /home/devel/.local/bin/pip: /snap/blender/2661/3.2/python/bin/python3.10: bad interpreter: No such file or directory

这和 Blender 有关吗?我卸载了 Blender snap,现在正在使用可执行文件。但问题仍然存在。

我只是想运行一个 .py 文件并用它来播放警报声音。它需要我playsound使用 pip 进行安装或类似操作。

任何帮助都将非常有帮助。谢谢。

答案1

无法使用 snap 包中的 pip 安装模块。模块playsound使用系统的 pip 安装,但 snap 包看不到它。

pip install playsound
Defaulting to user installation because normal site-packages is not writeable
Collecting playsound
  Downloading playsound-1.3.0.tar.gz (7.7 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: playsound
  Building wheel for playsound (setup.py) ... done
  Created wheel for playsound: filename=playsound-1.3.0-py3-none-any.whl size=7035 sha256=9860a90d2b50bb48c9ab4c28794674b3a3694a23da9e8d08d7bccd28cc164891
  Stored in directory: /home/xubuntu/.cache/pip/wheels/90/89/ed/2d643f4226fc8c7c9156fc28abd8051e2d2c0de37ae51ac45c
Successfully built playsound
Installing collected packages: playsound
Successfully installed playsound-1.3.0

尝试sudo snap remove --purge yoursnap; sudo apt install python3-pip

相关内容