英文:
package get installed under the include folder and not under site-packages
问题
我正在尝试使用conda install -c conda-forge diplib
命令安装一个包(具体来说是diplib
),但是出于某种原因,什么都没有添加到envs/env_name/lib/site-packages
。命令运行正常,没有任何警告或错误。一切看起来都很正常,但是我仍然收到'ModuleNotFoundError: No module named 'diplib'
错误。然而,我可以在envs/env_name/include
文件夹下找到一个名为diplib
的文件夹(实际上它包含头文件)。
请问有人知道发生了什么吗?include
文件夹的作用是什么?我们是否应该从中导入包,还是conda包出了问题,我需要删除(如何删除?)出现在include
目录下的diplid
?
这是在Ubuntu上(如果有关系的话)。
英文:
I am trying to install a package (more specifically diplib
) with conda install -c conda-forge diplib
but for some reason nothing is added to envs/env_name/lib/site-packages
. The command runs fine, no warnings/error at all. Everything looks normal but I am still getting 'ModuleNotFoundError: No module named 'diplib'
error. However I can find a folder diplib
under envs/env_name/include
(actually it contains header files).
Does anyone know what has happened please? What is the include folder for? Are we supposed to import packages from it or something is wrong with the conda package and I need to remove (how?) the diplid
that appeared under the include
directory
This is in Ubuntu (in case it matters)
答案1
得分: 2
通过快速的谷歌搜索,我找到了名为“diplib-feedstock”的Conda-Forge包(https://github.com/conda-forge/diplib-feedstock)。这很可能是您尝试安装的包的来源。从该存储库的文档中可以看出:
通过将
conda-forge
添加到您的频道,可以通过conda
安装conda-forge
渠道中的diplib
,方法如下:conda config --add channels conda-forge conda config --set channel_priority strict
一旦启用了
conda-forge
渠道,可以使用conda
安装diplib
和diplib-python
:conda install diplib diplib-python
看起来diplib
包是库(带有包含文件,正如您所发现的),而diplib-python
是Python包。
DIPlib项目通过PyPI提供了官方的Python包:pip install diplib
。
英文:
A quick Google search brought me to the Conda-Forge package called “diplib-feedstock”. This is likely the source of the package you’re trying to install. From the docs of that repo:
> Installing diplib
from the conda-forge
channel can be achieved by adding conda-forge
to your channels with:
> sh
> conda config --add channels conda-forge
> conda config --set channel_priority strict
>
> Once the conda-forge
channel has been enabled, diplib, diplib-python
can be installed with conda
:
> sh
> conda install diplib diplib-python
>
It looks like the diplib
package is the library (with include files as you found out), and diplib-python
is the Python package.
The DIPlib project provides an official Python package through PyPI: pip install diplib
.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论