首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何用Pynsist在python中安装numpy

如何用Pynsist在python中安装numpy
EN

Stack Overflow用户
提问于 2018-06-09 17:20:48
回答 1查看 313关注 0票数 2

如果我使用package构建了一个应用程序,然后在安装该应用程序之后,我将在应用程序路径的pkg文件夹中有一个numpy包,就像我在installer.cfg中提到的那样。但是在Python2.7的站点包中不会有任何numpy (安装是因为NSIS构建的应用程序下载了Python安装程序)。

那么,巨蟒如何才能知道计算机中是否有一个数字呢?换句话说,应用程序文件夹中的numpy包将如何链接到Python /site文件夹?我们是否需要将该文件夹复制到站点包位置,还是我遗漏了什么?

下面是installer.cfg代码

代码语言:javascript
复制
[Application]
name=FaceLock
version=1.0
# How to launch the app - this calls the 'main' function from the 'myapp' package:
entry_point=openApplication:self


[Python]
version=2.7.14



[Include]
# Packages from PyPI that your application requires, one per line
# These must have wheels on PyPI:
pypi_wheels=opencv-contrib-python==3.4.1.15
            numpy==1.14.0


# To bundle packages which don't publish wheels, see the docs on the
# config file.
packages=cv2
        PIL
        Tkinter
        glob



# Other files and folders that should be installed
files=detector.py
        dataSetGenerator.py
        trainData.py
        storeDictionary.py
        CheckFace.py
        CheckFace.py
        Classifiers/
        trainer/
        Trying/
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-11-24 03:45:29

在这里,为了让应用程序知道numpy也必须导入,我们在installer.cfg文件中添加了一个依赖项。依赖性是: anaconda-project。现在可以正确地导入numpy了。

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

https://stackoverflow.com/questions/50776779

复制
相关文章

相似问题

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