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

Tag 0.3.3 points to incorrect version in code, along with Python 3 compatibility issues #245

Open
kdipippo opened this issue May 27, 2020 · 1 comment

Comments

@kdipippo
Copy link

The latest release for this was created in 2017 with version 0.3.3: https://github.com/pybrain/pybrain/releases/tag/0.3.3
However, browsing the codebase, the setup.py had the version 0.3.1 baked in.
https://github.com/pybrain/pybrain/blob/882cf66a89b6b6bb8112f41d200c55461464aa06/setup.py

This doesn't matter all that much, but prior fixes to run PyBrain on newer versions (i.e. the solution in #201 to instead run python3 -m pip install https://github.com/pybrain/pybrain/archive/0.3.3.zip) are showing issues that have been addressed in later commits. For example:

from pybrain.datasets import SequentialDataSet

results in

Traceback (most recent call last):
  File "main.py", line 4, in <module>
    from pybrain.datasets import SequentialDataSet
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pybrain/__init__.py", line 1, in <module>
    from pybrain.structure.__init__ import *
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pybrain/structure/__init__.py", line 2, in <module>
    from pybrain.structure.modules.__init__ import *
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pybrain/structure/modules/__init__.py", line 2, in <module>
    from pybrain.structure.modules.gate import GateLayer, DoubleGateLayer, MultiplicationLayer, SwitchLayer
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pybrain/structure/modules/gate.py", line 10, in <module>
    from pybrain.tools.functions import sigmoid, sigmoidPrime
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pybrain/tools/functions.py", line 4, in <module>
    from scipy.linalg import inv, det, svd, logm, expm2
ImportError: cannot import name 'expm2' from 'scipy.linalg' (/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/scipy/linalg/__init__.py)

This issue was addressed in 5602313

@kdipippo
Copy link
Author

As a workaround for others, pip allows for a way to install dependencies based on commit hashes. For downloading the repo from the latest commit: dcdf32b

python3 -m pip install git+ssh://git@github.com/pybrain/pybrain.git@dcdf32ba1805490cefbc0bdeb227260d304fdb42

You can also add this as part of a requirements.txt file, i.e.:

mido==1.2.9
MIDIUtil==1.2.1
numpy==1.18.4
scipy==1.4.1
git+ssh://git@github.com/pybrain/pybrain.git@dcdf32ba1805490cefbc0bdeb227260d304fdb42

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

1 participant