Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ndd library can't run . No 'ndd.fnsb' file #2

Closed
YutaoChen0512 opened this issue Jul 24, 2019 · 10 comments
Closed

Ndd library can't run . No 'ndd.fnsb' file #2

YutaoChen0512 opened this issue Jul 24, 2019 · 10 comments

Comments

@YutaoChen0512
Copy link

Hello, the test_basic.py file in the test folder runs error.
ModuleNotFoundError: No module named 'ndd.fnsb'
Calculating the entropy using ndd alone will also report an error.
ModuleNotFoundError: No module named 'ndd.fnsb'
error code
I don't know how to solve this problem, I hope I can get your help. Thank you for answering my question.

@YutaoChen0512
Copy link
Author

@simomarsili

@simomarsili
Copy link
Owner

Hi,
this is small script that collects some info on your system:
https://gist.github.com/simomarsili/dcadc9a4e8ceff9043bcc56c540479cf

Can you run it and paste here the output?
Thank you

@YutaoChen0512
Copy link
Author

Sorry, I can't access this site.
Can you send this script to my mailbox?
My mail address is www.535713780@qq.com
Thank you very much for your help.
1

@YutaoChen0512 YutaoChen0512 reopened this Jul 30, 2019
@simomarsili
Copy link
Owner

No problem. This is the script:

# -*- coding: utf-8 -*-
"""System info"""

import platform
import sys
import numpy
import subprocess


print(
    """
    platform:
    %s

    architecture:
    %s, %s

    Python:
    %s

    NumPy:
    %s

    gfortran:
    %s
    """ % (
        platform.platform(),
        platform.architecture(), sys.maxsize > 2**32,
        sys.version,
        numpy.__version__,
        subprocess.run(['gfortran', '-v'], stderr=subprocess.PIPE).stderr.decode(),
    )
)

@YutaoChen0512
Copy link
Author

OK,This is the parameter of my system.

platform:
Windows-10-10.0.17763-SP0

architecture:
('64bit', 'WindowsPE'), True

Python:
3.6.7rc1 (v3.6.7rc1:311101f7b6, Sep 26 2018, 16:33:24) [MSC v.1900 64 bit (AMD64)]

NumPy:
1.13.1

gfortran:
Using built-in specs.

COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=d:/gfoetran/gfortran/bin/../libexec/gcc/mingw32/4.10.0/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-trunk/configure --prefix=/mingw --enable-languages=c,fortran,lto --with-gmp=/home/brad/gfortran/dependencies --disable-werror --enable-threads --enable-nls --build=i586-pc-mingw32 --enable-libgomp --enable-shared --disable-win32-registry --with-dwarf2 --disable-sjlj-exceptions --enable-lto --build=mingw32 --enable-version-specific-runtime-libs : (reconfigured) ../gcc-trunk/configure --prefix=/mingw --enable-languages=c,fortran,lto --with-gmp=/home/brad/gfortran/dependencies --disable-werror --enable-threads --enable-nls --build=i586-pc-mingw32 --enable-libgomp --enable-shared --disable-win32-registry --with-dwarf2 --disable-sjlj-exceptions --enable-lto --build=mingw32 --enable-version-specific-runtime-libs
Thread model: win32
gcc version 4.10.0 20140629 (experimental) [trunk revision 212119] (GCC)

Am I lacking the conditions for running the NDD library?

@YutaoChen0512 YutaoChen0512 reopened this Jul 30, 2019
@simomarsili
Copy link
Owner

Am I lacking the conditions for running the NDD library?

This looks like a windows-related issue (the package is not tested under windows). I think it can be solved.

  • In the package installation dir:
    C:\SSD\python3.6.7\lib\site-packages\ndd
    check if you have a .libs directory.
  • In the .libs directory, you should find a .dll file.
    Copy this file to the ndd directory (the installation dir).
  • Finally, try to import ndd (python -c "import ndd") and paste here any error message

@YutaoChen0512
Copy link
Author

Because I can't use pip to install ndd.
Ndd directory only you upload to github program, did not find .dlls directory and .dll files.
The reasons for the error are as follows:
2

ERROR: Command errored out with exit status 1: 'C:\SSD\python3.6.7\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\cyt\AppData\Local\Temp\pycharm-packaging\ndd\setup.py'"'"'; file='"'"'C:\Users\cyt\AppData\Local\Temp\pycharm-packaging\ndd\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\cyt\AppData\Local\Temp\pip-record-t8bcckrr\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.

@simomarsili
Copy link
Owner

simomarsili commented Jul 30, 2019

Please download the python wheel ndd-1.4.1-cp37-cp37m-win_amd64.whl from this repo:

https://github.com/simomarsili/ndd-wheels

(direct link to the file)

Install it using pip:

pip install ndd-1.4.1-cp37-cp37m-win_amd64.whl

the wheel contains the ndd package with compiled extensions for Windows.
This should work. Let me know.
Bye

@YutaoChen0512
Copy link
Author

Sorry, I have not been able to respond to your information in time because of some things.
I have installed the new ndd library.But still have previous problems.
The contents of python -c "import ndd" are as follows:
ndd

ModuleNotFoundError: No module named 'ndd.fnsb'

@simomarsili
Copy link
Owner

try to update your numpy version:
pip install -U numpy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants