首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在AWS的TDM Studio中安装enchant C库(使用ProQuest SageMaker服务器)

在AWS的TDM Studio中安装enchant C库(使用ProQuest SageMaker服务器)
EN

Stack Overflow用户
提问于 2021-07-13 05:07:15
回答 1查看 45关注 0票数 0

我在亚马逊网络服务SageMaker中安装enchant C库时遇到了问题。我遵循以下步骤(我使用os.system从jupyter-notebook -in python语言向终端发送命令,os.popen -for获得终端的输出- ):

(1)请求"enchant C library“repo:

代码语言:javascript
复制
os.propen("yum whatprovides enchant")

前面的代码片段的答案是:

代码语言:javascript
复制
Loaded plugins: dkms-build-requieres, priorities, update-motd, upgrade-helper,
            : versionlock
Could not retrieve mirrorlist http://repo.us-east-1.amazonaws.com/latest/main/mirror.list error was 14: HTTP Error 403 - Forbidden
Could not retrieve mirrorlist http://repo.us-east-1.amazonaws.com/latest/main/mirror.list error was 14: HTTP Error 403 - Forbidden
1:enchant-1.6.0-5.2.amzn1.i686 : An Enchanting Spell Checking Library
Repo   : amzn-main
1:enchant-1.6.0-5.2.amzn1.x86_64 : An Enchanting Spell Checking Library
Repo   : amzn-main

(2)安装enchant-1.6.0-5.2.amzn1.x86_64包:

代码语言:javascript
复制
os.popen( "sudo yum install enchant -y" )

前面的代码片段的答案是:

代码语言:javascript
复制
Loaded plugins: dkms-build-requieres, priorities, update-motd, upgrade-helper,
            : versionlock
Could not retrieve mirrorlist http://repo.us-east-1.amazonaws.com/latest/main/mirror.list error was 14: HTTP Error 403 - Forbidden
Could not retrieve mirrorlist http://repo.us-east-1.amazonaws.com/latest/main/mirror.list error was 14: HTTP Error 403 - Forbidden
Resolving Dependencies
--> Running transaction check
---> Package enchant.x86_64 1:1.6.0-5.2.amzn1 will be installed
--> Proecssing Dependecy: libhunspell-1.2.so.0()(64bit) for package: 1:enchant-1.6.0-5.2.amzn1.x86_64
--> Running transaction check
---> Package hunspell.x86_64 0:1.2.8-16.2.amzn1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved
enter code here
=======================================================================
Package              Arch      Version            Repository     Size
=======================================================================
Installing:
enchant             x86_64    1:1.6.0-5.2.amzn1   amzn-main        54 k
Instanlling for dependencies:
hunspell            x86_64    1:1.8-16.2.amzn1    amzn-main       191 k

Transaction Summary
=======================================================================
Install 1 Package (+1 Denpendet package)

Total download size: 245 k
Installed size: 514 k
Downloading packages:

因此,安装enchant C库的最后一步就足够了,但是当我尝试在python中导入enchant时,我得到了以下输出:

代码语言:javascript
复制
import enchant
-------------------------------------------
Import Error: The 'enchant' C library was not found and maybe needs to be installed.
See https://pyenchant.github.io/pyenchant/install.html
for details
EN

回答 1

Stack Overflow用户

发布于 2021-07-14 21:56:48

我发现了错误,下面的步骤是正确的(对于安装enchant包),问题是服务器无法访问repos,所以无法下载包。原因是(我在我的问题中省略了一个细节:我通过ProQuest的TDM Studio在aws服务器上工作)服务器只是不从蟒蛇或PyPI存储库加载包。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68353879

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档