我想为perforce使用python库。我通过导入P4创建了一个python脚本。为了使用它,我安装了perforce-p4python3,步骤如下:
created a file in /etc/apt/sources.list.d/perforce.list with below content
debhttp://package.perforce.com/apt/ubuntu/仿生释放
wget -qO - https://package.perforce.com/perforce.pubkey | sudo apt-key add - sudo apt-get update
sudo apt install perforce-p4python
当我执行python脚本时,我发现下面的错误
import P4
ModuleNotFoundError: No module named 'P4'
当我再次尝试安装时
sudo apt install perforce-p4python3
Reading package lists... Done
Building dependency tree
Reading state information... Done
perforce-p4python3 is already the newest version (2020.1-1983437~bionic).
0 upgraded, 0 newly installed, 0 to remove and 100 not upgraded.
当我执行pip冻结时,我看不到python。我错过什么了吗?。如何在python中使用P4()功能
我发现了问题。这是因为python版本不匹配。我使用python3执行python脚本
相关问题 更多 >
编程相关推荐