Code Monkey home page Code Monkey logo

Comments (6)

DanielLenz avatar DanielLenz commented on June 8, 2024 1

There's a couple of ways to address this I think, some are described here.

I'll go ahead and test this on my machine as soon as possible - I can highly relate to the frustration of trying to debug mac OS issues via travis, it just takes forever and you run into the most obscure errors...

from rfbp.

Nico-Curti avatar Nico-Curti commented on June 8, 2024

Hi @DanielLenz. Thanks for you comment.
The numpy and cython packages are required for the C++ compilation and thus they need to be installed beforehand.
We couldn't find any way to make pip install them before running the setup.py
Therefore we put the warning for the user in the documentation asking to install numpy and cython before running the pip command.
The same issue is not verified in the travis CI since we directly call the setup from the cloned repository.

If you have any suggestion about how overcome this issue please let us know.

from rfbp.

Nico-Curti avatar Nico-Curti commented on June 8, 2024

Hi @DanielLenz,
We have found a possible solution for our installation issue here. Using a pyproject.toml file the pip installation should pre-install all the requirements (cython and numpy in our specific case). In the latest release we have added this file (and some comments in the documentation to warn the users). We hope we have fixed the issue in this way.

from rfbp.

DanielLenz avatar DanielLenz commented on June 8, 2024

Thanks for working on that and congratulations on the paper!

The install via pip in a fresh venv worked fine, but I ran into an issue when trying to test the package:

In [2]: from ReplicatedFocusingBeliefPropagation import ReplicatedFocusingBeliefPropagation as rFBP
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-2-1fd08364e9f5> in <module>
----> 1 from ReplicatedFocusingBeliefPropagation import ReplicatedFocusingBeliefPropagation as rFBP

~/.local/share/virtualenvs/rFBP-ecxdbiWG/lib/python3.7/site-packages/ReplicatedFocusingBeliefPropagation/__init__.py in <module>
      7 import sys
      8 import warnings
----> 9 from .__version__ import __version__
     10
     11 from .rfbp.ReplicatedFocusingBeliefPropagation import ReplicatedFocusingBeliefPropagation

~/.local/share/virtualenvs/rFBP-ecxdbiWG/lib/python3.7/site-packages/ReplicatedFocusingBeliefPropagation/__version__.py in <module>
     44   LOCAL = ''
     45
---> 46 VERSION = read_version(os.path.join(LOCAL, './CMakeLists.txt'))
     47
     48 __version__ = '.'.join(map(str, VERSION))

~/.local/share/virtualenvs/rFBP-ecxdbiWG/lib/python3.7/site-packages/ReplicatedFocusingBeliefPropagation/__version__.py in read_version(CMakeLists)
     25   revision = re.compile(r'set\s+\(RFBP_REVISION\s+(\d+)\)')
     26
---> 27   with open(CMakeLists, 'r') as fp:
     28     cmake = fp.read()
     29

FileNotFoundError: [Errno 2] No such file or directory: '/Users/lenzda/.local/share/virtualenvs/rFBP-ecxdbiWG/lib/python3.7/site-packages/ReplicatedFocusingBeliefPropagation/.././CMakeLists.txt'

from rfbp.

Nico-Curti avatar Nico-Curti commented on June 8, 2024

Hi @DanielLenz
Thanks for your comment. We had many problems with the file location in the Pypi uploading. Since the problem seems to be related to the CMake file, in the latest commit (and also release) we have changed the version-detection.
It should work now.

from rfbp.

DanielLenz avatar DanielLenz commented on June 8, 2024

Thanks @Nico-Curti !

I now run into the following issue:

In [2]: import ReplicatedFocusingBeliefPropagation
/Users/lenzda/.local/share/virtualenvs/rFBP-ecxdbiWG/lib/python3.7/site-packages/ReplicatedFocusingBeliefPropagation/__init__.py:31: UserWarning: Atanherf file not found. It will be downloaded before continue
  warnings.warn('Atanherf file not found. It will be downloaded before continue')
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-2-1b130b189fd3> in <module>
----> 1 import ReplicatedFocusingBeliefPropagation

~/.local/share/virtualenvs/rFBP-ecxdbiWG/lib/python3.7/site-packages/ReplicatedFocusingBeliefPropagation/__init__.py in <module>
     33   sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'scripts'))
     34
---> 35   from download_atanherf import get_atanherf
     36
     37   get_atanherf('179OcORFBvcUGzGHBEVU8lUGLS70c1ZI_')

ModuleNotFoundError: No module named 'download_atanherf'

Have you considered also adding a pip build to the test matrix? That might help to discover and to address these issues - I'm sure most users will try to install via pip before installing from source. Cheers :)

from rfbp.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.