简体   繁体   English

ModuleNotFoundError:没有名为“PyDIP”的模块,尽管它已安装

[英]ModuleNotFoundError: No module named 'PyDIP', although it's installed

Trying to work with image recognition, I installed Python with OpenCV, following this tutorial .尝试使用图像识别,我按照本教程安装了带有 OpenCV 的 Python。 Later on, I decided to give PyDIP a try, running the commands given on this answer .后来,我决定尝试 PyDIP,运行此答案中给出的命令。

The first command just don't work:第一个命令不起作用:

>>> import PyDIP as dip
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'PyDIP'

I tried to install it using:我尝试使用以下方法安装它:

(cv) user@pc:~$ python -m pip install PyDIP
Requirement already satisfied: PyDIP in ./.virtualenvs/cv/lib/python3.7/site-packages (0.1.8)

The location of python and pip also seem correct: python 和 pip 的位置似乎也正确:

(cv) user@pc:~$ which -a python
/home/user/.virtualenvs/cv/bin/python
/usr/bin/python
/bin/python

(cv) user@pc:~$ which -a pip
/home/user/.virtualenvs/cv/bin/pip
/usr/local/bin/pip

I'm using a Virtual Environment (exactly as in the first link), thus the (cv) on the prompt.我正在使用虚拟环境(与第一个链接中的完全相同),因此提示中使用了(cv) There are different Python versions installed, but as I've read, the first one listed with which should be used.有安装了不同的Python版本,但我读过,第一个列出了which应该被使用。 If the python and pip executables are on the same folder as the PyDIP package, what's going on?如果 python 和 pip 可执行文件与 PyDIP 包在同一个文件夹中,发生了什么?

I'm using Debian 10, python 3.7.3 and pip 20.0.2.我正在使用 Debian 10、python 3.7.3 和 pip 20.0.2。

The project has top-level package pydip (not PyDIP ).该项目具有顶级包pydip (不是PyDIP )。 So import it:所以导入它:

import pydip as dip

AFAIU PyDIP is a different package . AFAIU PyDIP是一个不同的包

You are trying to install the PyDIP module by installing it with pip, but the Python Package Index says the pydip module on there is an您正在尝试通过使用 pip 安装 PyDIP 模块来安装它,但是Python 包索引说那里的 pydip 模块有一个

Adjudication logic engine for Diplomacy board game外交棋盘游戏的裁决逻辑引擎

To install it you have to build it from source .要安装它,您必须从源代码构建它。

Check here for help. 在这里查看帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ModuleNotFoundError:虽然安装了 Django 中没有名为“moviepy”的模块 - ModuleNotFoundError: No module named 'moviepy' in Django although installed ModuleNotFoundError:尽管已安装,但没有名为“moviepy”的模块 - ModuleNotFoundError: No module named 'moviepy' although installed ModuleNotFoundError:尽管 Anaconda 导航器上安装了 ffmpeg,但 Spyder 上没有名为“ffmpeg”的模块 - ModuleNotFoundError: No module named 'ffmpeg' on Spyder although ffmpeg is installed on Anaconda navigator PyCharm中没有名为“ Keras”的模块,尽管它已安装并且在终端中可以正常工作 - No module named 'Keras' in PyCharm, although it's installed and works fine in the terminal ModuleNotFoundError: No module named 'Practise' - 虽然这个文件夹存在 - ModuleNotFoundError: No module named 'Practise' - Although this folder exists VS Code:“导入错误:没有名为请求的模块”,尽管它已安装 - VS Code: "Import Error: No module named request" although it's installed “ModuleNotFoundError:即使安装了模块,也没有名为‘...’的模块 - "ModuleNotFoundError: No module named '…' even though module is installed matplotlib 已安装 - ModuleNotFoundError: No module named 'matplotlib' - matplotlib installed - ModuleNotFoundError: No module named 'matplotlib' ModuleNotFoundError:即使已安装,也没有名为“pycountry”的模块 - ModuleNotFoundError: No module named 'pycountry' even though it is installed ModuleNotFoundError:即使安装后也没有名为“selenium”的模块 - ModuleNotFoundError: No module named 'selenium' even after installed
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM