Comments (17)
I personally use Python 3.10.4 with Nosetests 1.3.7 and it works. I don't see the hyperon code in the stack trace you posted, so I think it is probably some compatibility issue between Python and Nosetests which are installed on your system. The possible root cause is CMake finds incorrect version of Python or Nosetests somewhere in the system.
Could you please check paths to your executable files, to do this run the following command in ./build
directory:
cmake --system-information | grep EXECUTABLE | egrep 'NOSE|PYTHON'
from hyperon-experimental.
I have multiple python versions in my system and CMake keeps getting the older one and was unable to find hyperonpy
module. So I created a virtual environment with Python 3.10 and that's what I used to build hyperon.
The output of the above command
NOSETESTS_EXECUTABLE:FILEPATH=/home/hedra/SNET/hyperon-experimental/venv/bin/nosetests
PYTHON_EXECUTABLE:FILEPATH=/home/hedra/SNET/hyperon-experimental/venv/bin/python
//ADVANCED property for variable: PYTHON_EXECUTABLE
PYTHON_EXECUTABLE-ADVANCED:INTERNAL=1
Python and Nosetests versions in the venv
(venv) build $nosetests --version
nosetests version 1.3.7
(venv) build $python --version
Python 3.10.4
(venv) build $
from hyperon-experimental.
Versions are definitely ok, and CMake finds tools right. I did't know nose
is outdated and replaced by nose2
. I found nice analysis of the issue here: nose-devs/nose#1099.
I am not sure why python -m pip install -e ./python[dev]
works to me and others but doesn't work in your environment but it seems that PyPi version of nose
is broken and should be built from sources to be compatible with Python 3.10. I can suggest trying pip install -U nose --no-binary :all:
to rebuild nose from source as mentioned here as a workaround. Please write back if it work or not.
As a long term solution it is probably better to migrate to pytest
or nose2
. @noskill do you have any preferences here?
from hyperon-experimental.
The installation python -m pip install -e ./python[dev]
works for me as well.
I only got the above AttributeError: module 'collections' has no attribute 'Callable'
error during cmake build specifically when I do make check
.
The suggestion to rebuild nose doesn't seem to update anything, this what I get when I try:
(venv) hyperon-experimental $pip install -U nose --no-binary :all:
Requirement already satisfied: nose in ./venv/lib/python3.10/site-packages (1.3.7)
from hyperon-experimental.
Try this one, to force reinstall package:
pip install -U --force-reinstall nose --no-binary :all:
from hyperon-experimental.
The force reinstall fixes the collections
error. But got another error with the print statement
from nose import main
File "/home/hedra/SNET/hyperon-experimental/venv/lib/python3.10/site-packages/nose/__init__.py", line 1, in <module>
from nose.core import collector, main, run, run_exit, runmodule
File "/home/hedra/SNET/hyperon-experimental/venv/lib/python3.10/site-packages/nose/core.py", line 153
print "%s version %s" % (os.path.basename(sys.argv[0]), __version__)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
from hyperon-experimental.
Looks like it generated a module for a Python 2. Do you have pip
installed in your environment? What does pip --version
show?
from hyperon-experimental.
Yes, it is 21.3.1
from hyperon-experimental.
To me pip
also prints a Python version:
$ pip --version
pip 21.0 from /usr/lib/python3.10/site-packages/pip (python 3.10)
from hyperon-experimental.
I only send the version sorry,
(venv) build $pip --version
pip 21.3.1 from /home/hedra/SNET/hyperon-experimental/venv/lib/python3.10/site-packages/pip (python 3.10)
from hyperon-experimental.
Ok, it looks strange: your environment seems to be consistent but somehow it generates Python 2 code during installation of the nose
module.
from hyperon-experimental.
I am not sure how pip works here. Guys in nose
issue thread mentioned that nose
for a Python 3 is converted from Python 2 code. Looks like in your case this doesn't work. Could you please execute: pip install -v -U --force-reinstall nose --no-binary :all: 2>&1 | tee /tmp/pip.log
and attach the /tmp/pip.log
file to the issue.
from hyperon-experimental.
from hyperon-experimental.
Ok, log shows that nose
is definitely installed as a Python 2 app. Python tries to compile it but cannot because of compatibility errors. As a last hope please try:
pip uninstall -y nose
pip install nose-py3
May be it will help.
from hyperon-experimental.
It works. Thanks!
My nosetest version is now 1.4.
Closing the issue.
from hyperon-experimental.
Unfortunately nose-py3
has an issue itself: atsb/nose-py3#1 (comment) so I cannot recommend this workaround as a general solution.
from hyperon-experimental.
Looks like it works when Nosetests is installed using a system package manager or using environment like Anaconda which also install packages from own repo not from PyPi.
from hyperon-experimental.
Related Issues (20)
- cdr-atom in minimal metta is very slow HOT 2
- (pragma! type-check auto) in standard library slows down the execution
- Unifying a structure of variables with a structured function name is not disabled HOT 7
- Atom as a return Type HOT 1
- Code doesn't compile without "pkg_mgmt" feature enabled
- assertEqualToResult gives the same result for correct and incorrect pattern in dasgate example HOT 1
- AssertEqual[toResult] may analyze difference in detail
- parse grounded operation is badly implemented HOT 5
- How to delay reduction until bindings are ready?
- get-doc units tests are slow
- Python package version is determined incorrectly in repository forks as "0.1.devX+Y" HOT 5
- py-atom problem with multiply import HOT 2
- Type checking doesn't work for tuples. HOT 2
- Type checking for the Symbol meta-type doesn't work properly HOT 1
- MeTTa should support single sided matching HOT 14
- !(import! &self lib) is not working for python libraries HOT 7
- Referential transparency on non-deterministic functions
- C interface does not build HOT 6
- Documenting how to use LLM gate and test_assist.metta HOT 2
- pkg_mgmt, Support for git-hosted modules specified with custom revisions &/or tags
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hyperon-experimental.