question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Latest release breaking Python 2.7, 3.4 (SyntaxError)

See original GitHub issue

In nipype, tests are breaking in Python 2.7, 3.4, due to the @ operator:

./../../virtualenv/python2.7.15/lib/python2.7/site-packages/py/_path/local.py:668: in pyimport
    __import__(modname)
nipype/interfaces/nitime/__init__.py:5: in <module>
    from .analysis import (CoherenceAnalyzerInputSpec, CoherenceAnalyzerOutputSpec,
nipype/interfaces/nitime/analysis.py:28: in <module>
    package_check('nitime')
nipype/utils/misc.py:180: in package_check
    mod = __import__(pkg_name)
../../../virtualenv/python2.7.15/lib/python2.7/site-packages/nitime/__init__.py:26: in <module>
    from . import algorithms
../../../virtualenv/python2.7.15/lib/python2.7/site-packages/nitime/algorithms/__init__.py:62: in <module>
    from nitime.algorithms.event_related import *
E     File "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/nitime/algorithms/event_related.py", line 60
E       h = np.array(linalg.pinv(X.T @ X) @ X.T @ y.T)
E                                    ^
E   SyntaxError: invalid syntax

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
effigiescommented, Jun 25, 2019

That works, though just strategically, I would jump to 0.9.0 for the new syntax, to signify a breaking change, and give you room to use 0.8.x to do any remaining fixes for old Python.

0reactions
effigiescommented, Jun 26, 2019

Just to confirm, this fixed the failing nipype tests. Thanks again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

asyncio 3.4.3 breaks python 2.7 · Issue #386 - GitHub
This is a real bug which can be prevented with a simple python version check inside setup.py , avoiding such accidents. What is...
Read more >
How to fix Python 2.7 and Numpy syntax error in tmp directory
The problem happening is that file is in a tmp directory which I am not able to debug. From the error I am...
Read more >
What's New in Python 2.7 — Python 3.11.1 documentation
Author, A.M. Kuchling (amk at amk.ca),. This article explains the new features in Python 2.7. Python 2.7 was released on July 3, 2010....
Read more >
Caret positioned wrong for SyntaxError reported by ast.c
It seems this has been happening since ast.c started added column numbers -- in Python 2.7 there's no caret at all, but in...
Read more >
Changelog — Python 3.11.1 documentation
Python next: Release date: XXXX-XX-XX Core and Builtins: gh-100374: Fix incorrect result and delay in socket.getfqdn().
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found