{"action":"created","issue":{"url":"https://api.github.com/repos/brian-team/brian2/issues/653","repository_url":"https://api.github.com/repos/brian-team/brian2","labels_url":"https://api.github.com/repos/brian-team/brian2/issues/653/labels{/name}","comments_url":"https://api.github.com/repos/brian-team/brian2/issues/653/comments","events_url":"https://api.github.com/repos/brian-team/brian2/issues/653/events","html_url":"https://github.com/brian-team/brian2/issues/653","id":137276520,"number":653,"title":"Add Python 3.5 support (concerns also default installation method via Anaconda)","user":{"login":"moritzaugustin","id":4638480,"avatar_url":"https://avatars.githubusercontent.com/u/4638480?v=3","gravatar_id":"","url":"https://api.github.com/users/moritzaugustin","html_url":"https://github.com/moritzaugustin","followers_url":"https://api.github.com/users/moritzaugustin/followers","following_url":"https://api.github.com/users/moritzaugustin/following{/other_user}","gists_url":"https://api.github.com/users/moritzaugustin/gists{/gist_id}","starred_url":"https://api.github.com/users/moritzaugustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moritzaugustin/subscriptions","organizations_url":"https://api.github.com/users/moritzaugustin/orgs","repos_url":"https://api.github.com/users/moritzaugustin/repos","events_url":"https://api.github.com/users/moritzaugustin/events{/privacy}","received_events_url":"https://api.github.com/users/moritzaugustin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-29T14:51:13Z","updated_at":"2016-02-29T15:08:50Z","closed_at":null,"body":"I have trouble using Brian2 with Python 3.5 (which one occurs when taking the default way of installing Brian 2 for Python 3 according to http://brian2.readthedocs.org/en/latest/introduction/install.html):\r\n\r\nWhen installing recent Anaconda either Python version 2.7 or 3.5 can be chosen. For the first conda install brian2 works nicely. For the latter brian2 seems to require Python 3.4 and the dependency resolution fails. \r\n\r\nWhen installing Brian 2 manually (on Arch Linux) using Python 3.5 and \"pip install Brian2\" the installation runs through, however, when importing brian2 errors show up which differ for 2.0beta4 and recent master branch:\r\n\r\nrecent master:\r\n```\r\n$ python\r\nPython 3.5.1 (default, Dec  7 2015, 12:58:09) \r\n[GCC 5.2.0] on linux\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import brian2\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/home/augustin/Projects/Brian2/github/brian-team_brian2/brian2/__init__.py\", line 64, in <module>\r\n    import brian2.numpy_ as numpy\r\n  File \"/home/augustin/Projects/Brian2/github/brian-team_brian2/brian2/numpy_.py\", line 8, in <module>\r\n    from brian2.units.unitsafefunctions import *\r\n  File \"/home/augustin/Projects/Brian2/github/brian-team_brian2/brian2/units/__init__.py\", line 4, in <module>\r\n    from .allunits import (\r\n  File \"/home/augustin/Projects/Brian2/github/brian-team_brian2/brian2/units/allunits.py\", line 2036, in <module>\r\n    metre = Unit.create(get_or_create_dimension(m=1), \"metre\", \"m\")\r\n  File \"/home/augustin/Projects/Brian2/github/brian-team_brian2/brian2/units/fundamentalunits.py\", line 1868, in create\r\n    for s, i in itertools.izip(scale, dim._dims):\r\nAttributeError: module 'itertools' has no attribute 'izip'\r\n```\r\n\r\n2.0beta4:\r\n```\r\n$ python\r\nPython 3.5.1 (default, Dec  7 2015, 12:58:09) \r\n[GCC 5.2.0] on linux\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import brian2\r\nERROR    brian2: Brian 2 encountered an unexpected error. If you think this is bug in Brian 2, please report this issue either to the mailing list at <http://groups.google.com/group/brian-development/>, or to the issue tracker at <https://github.com/brian-team/brian2/issues>. Please include this file with debug information in your report: /tmp/brian_debug_f8y9cx8l.log  Thanks!\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/home/augustin/.local/lib/python3.5/site-packages/brian2/__init__.py\", line 66, in <module>\r\n    from brian2.only import *\r\n  File \"/home/augustin/.local/lib/python3.5/site-packages/brian2/only.py\", line 34, in <module>\r\n    from brian2.stateupdaters import *\r\n  File \"/home/augustin/.local/lib/python3.5/site-packages/brian2/stateupdaters/__init__.py\", line 7, in <module>\r\n    from .explicit import *\r\n  File \"/home/augustin/.local/lib/python3.5/site-packages/brian2/stateupdaters/explicit.py\", line 659, in <module>\r\n    stochastic='additive')\r\n  File \"/home/augustin/.local/lib/python3.5/site-packages/brian2/stateupdaters/explicit.py\", line 243, in __init__\r\n    expression = str_to_sympy(element.expression)\r\n  File \"/home/augustin/.local/lib/python3.5/site-packages/brian2/parsing/sympytools.py\", line 51, in str_to_sympy\r\n    rendered = SympyNodeRenderer().render_expr(expr)\r\n  File \"/home/augustin/.local/lib/python3.5/site-packages/brian2/parsing/rendering.py\", line 53, in render_expr\r\n    return self.render_node(node.body)\r\n  File \"/home/augustin/.local/lib/python3.5/site-packages/brian2/parsing/rendering.py\", line 66, in render_node\r\n    return getattr(self, methname)(node)\r\n  File \"/home/augustin/.local/lib/python3.5/site-packages/brian2/parsing/rendering.py\", line 122, in render_BinOp\r\n    return self.render_BinOp_parentheses(node.left, node.right, node.op)\r\n  File \"/home/augustin/.local/lib/python3.5/site-packages/brian2/parsing/rendering.py\", line 117, in render_BinOp_parentheses\r\n    return '%s %s %s' % (self.render_element_parentheses(left),\r\n  File \"/home/augustin/.local/lib/python3.5/site-packages/brian2/parsing/rendering.py\", line 109, in render_element_parentheses\r\n    return '(%s)' % self.render_node(node)\r\n  File \"/home/augustin/.local/lib/python3.5/site-packages/brian2/parsing/rendering.py\", line 66, in render_node\r\n    return getattr(self, methname)(node)\r\n  File \"/home/augustin/.local/lib/python3.5/site-packages/brian2/parsing/rendering.py\", line 122, in render_BinOp\r\n    return self.render_BinOp_parentheses(node.left, node.right, node.op)\r\n  File \"/home/augustin/.local/lib/python3.5/site-packages/brian2/parsing/rendering.py\", line 119, in render_BinOp_parentheses\r\n    self.render_element_parentheses(right))\r\n  File \"/home/augustin/.local/lib/python3.5/site-packages/brian2/parsing/rendering.py\", line 109, in render_element_parentheses\r\n    return '(%s)' % self.render_node(node)\r\n  File \"/home/augustin/.local/lib/python3.5/site-packages/brian2/parsing/rendering.py\", line 66, in render_node\r\n    return getattr(self, methname)(node)\r\n  File \"/home/augustin/.local/lib/python3.5/site-packages/brian2/parsing/rendering.py\", line 122, in render_BinOp\r\n    return self.render_BinOp_parentheses(node.left, node.right, node.op)\r\n  File \"/home/augustin/.local/lib/python3.5/site-packages/brian2/parsing/rendering.py\", line 119, in render_BinOp_parentheses\r\n    self.render_element_parentheses(right))\r\n  File \"/home/augustin/.local/lib/python3.5/site-packages/brian2/parsing/rendering.py\", line 107, in render_element_parentheses\r\n    return self.render_node(node)\r\n  File \"/home/augustin/.local/lib/python3.5/site-packages/brian2/parsing/rendering.py\", line 66, in render_node\r\n    return getattr(self, methname)(node)\r\n  File \"/home/augustin/.local/lib/python3.5/site-packages/brian2/parsing/rendering.py\", line 83, in render_Call\r\n    elif node.starargs is not None:\r\nAttributeError: 'Call' object has no attribute 'starargs'\r\n```"},"comment":{"url":"https://api.github.com/repos/brian-team/brian2/issues/comments/190251046","html_url":"https://github.com/brian-team/brian2/issues/653#issuecomment-190251046","issue_url":"https://api.github.com/repos/brian-team/brian2/issues/653","id":190251046,"user":{"login":"mstimberg","id":1381982,"avatar_url":"https://avatars.githubusercontent.com/u/1381982?v=3","gravatar_id":"","url":"https://api.github.com/users/mstimberg","html_url":"https://github.com/mstimberg","followers_url":"https://api.github.com/users/mstimberg/followers","following_url":"https://api.github.com/users/mstimberg/following{/other_user}","gists_url":"https://api.github.com/users/mstimberg/gists{/gist_id}","starred_url":"https://api.github.com/users/mstimberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstimberg/subscriptions","organizations_url":"https://api.github.com/users/mstimberg/orgs","repos_url":"https://api.github.com/users/mstimberg/repos","events_url":"https://api.github.com/users/mstimberg/events{/privacy}","received_events_url":"https://api.github.com/users/mstimberg/received_events","type":"User","site_admin":false},"created_at":"2016-02-29T15:08:50Z","updated_at":"2016-02-29T15:08:50Z","body":"The 2.0b4 does indeed not work with Python 3.5 (it was released before 3.5), but the current master branch does (the test suite is running against Python 3.5). From your error, it seems that you are trying to run Brian 2 directly from the source directory. This works for Python 2 but not for Python 3, because you'll have to use the files converted by the `2to3` utility. You'll therefore have to run `python setup.py install` or `pip install .` before using it. From the docs:\r\n\r\n> You can also directly clone the git repository at github (https://github.com/brian-team/brian2) and then run `python setup.py install` or `python setup.py develop` or simply add the source directory to your PYTHONPATH (this will only work for Python 2.x).\r\n\r\n"}}