包将安装在include文件夹下,而不是site-packages文件夹下。

huangapple go评论68阅读模式
英文:

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安装diplibdiplib-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.

huangapple
  • 本文由 发表于 2023年2月27日 05:53:29
  • 转载请务必保留本文链接:https://go.coder-hub.com/75575237.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定