2

If i have built an application using Pynsist package and then after the installation of that application, I will have a numpy package in the pkg folder of the application path just like what i mentioned in the installer.cfg. But there wont be any numpy in the site-packages of Python 2.7 (installed because of the python installer downloaded by NSIS built application.

So how would the python know if there is a numpy in the computer or not? In other words, how would the numpy package in the application folder will link itself to Python lib/site-package folder? Do we need to copy that folder into the site-package location or am I missing something?

Below is the installer.cfg code

[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/
idleberg
  • 12,634
  • 7
  • 43
  • 70
akshit bhatia
  • 573
  • 6
  • 22
  • 1
    Numpy doesn't need to be copied/linked to site-packages. The application installed by Pynsist adds its `pkgs` directory to the list of places it looks for imports, with this code: https://github.com/takluyver/pynsist/blob/950d8956956e9a805ea073706f883d11f3c0757e/nsist/__init__.py#L235-L236 – Thomas K Jun 11 '18 at 16:03
  • 1
    Thank you. Yes you are right. pkgs folder will be the place where numpy will be looked for. When I added anaconda-project dependency to installer.cfg, everything is working fine for me now. Now i am not facing any issue related to numpy.array.multicore – akshit bhatia Jun 16 '18 at 16:41

1 Answers1

0

Here, to let the application know that numpy has also to be imported, we add a dependency in installer.cfg file. The dependency is: anaconda-project. Now the numpy can be imported properly.

akshit bhatia
  • 573
  • 6
  • 22