LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-05-2024, 08:15 AM   #31
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,923
Blog Entries: 1

Rep: Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885

As a start, insert the latest version of your program. (You might want to remove everything that is not necessary to demonstrate the problem.)
 
Old 07-05-2024, 10:12 AM   #32
piotrbujakowski
Member
 
Registered: Jan 2017
Location: London, UK
Distribution: Ubuntu
Posts: 47

Original Poster
Rep: Reputation: 1
Code:
Python 3.12.3 (main, Apr 10 2024, 05:33:47) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license()" for more information.

= RESTART: /home/peter/python/ai_neural_brain_2/engine_brain_2_11_neurons_group_and_synapses_talking.py

A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.

Traceback (most recent call last):  File "<string>", line 1, in <module>
  File "/usr/lib/python3.12/idlelib/run.py", line 165, in main
    ret = method(*args, **kwargs)
  File "/usr/lib/python3.12/idlelib/run.py", line 580, in runcode
    exec(code, self.locals)
  File "/home/peter/python/ai_neural_brain_2/engine_brain_2_11_neurons_group_and_synapses_talking.py", line 1, in <module>
    import brian2 as b2
  File "/usr/lib/python3/dist-packages/brian2/__init__.py", line 42, in <module>
    from pylab import *
  File "/usr/lib/python3/dist-packages/pylab.py", line 1, in <module>
    from matplotlib.pylab import *
  File "/usr/lib/python3/dist-packages/matplotlib/__init__.py", line 113, in <module>
    from . import _api, _version, cbook, _docstring, rcsetup
  File "/usr/lib/python3/dist-packages/matplotlib/rcsetup.py", line 27, in <module>
    from matplotlib.colors import Colormap, is_color_like
  File "/usr/lib/python3/dist-packages/matplotlib/colors.py", line 56, in <module>
    from matplotlib import _api, _cm, cbook, scale
  File "/usr/lib/python3/dist-packages/matplotlib/scale.py", line 22, in <module>
    from matplotlib.ticker import (
  File "/usr/lib/python3/dist-packages/matplotlib/ticker.py", line 138, in <module>
    from matplotlib import transforms as mtransforms
  File "/usr/lib/python3/dist-packages/matplotlib/transforms.py", line 49, in <module>
    from matplotlib._path import (
Traceback (most recent call last):
  File "/home/peter/.local/lib/python3.12/site-packages/numpy/core/_multiarray_umath.py", line 44, in __getattr__
    raise ImportError(msg)
ImportError: 
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.


Traceback (most recent call last):
  File "/usr/lib/python3.12/idlelib/run.py", line 580, in runcode
    exec(code, self.locals)
  File "/home/peter/python/ai_neural_brain_2/engine_brain_2_11_neurons_group_and_synapses_talking.py", line 1, in <module>
    import brian2 as b2
  File "/usr/lib/python3/dist-packages/brian2/__init__.py", line 56, in <module>
    import brian2.numpy_ as numpy
  File "/usr/lib/python3/dist-packages/brian2/numpy_.py", line 12, in <module>
    from brian2.units.unitsafefunctions import *
  File "/usr/lib/python3/dist-packages/brian2/units/__init__.py", line 7, in <module>
    from .allunits import (
  File "/usr/lib/python3/dist-packages/brian2/units/allunits.py", line 13, in <module>
    from .fundamentalunits import (
  File "/usr/lib/python3/dist-packages/brian2/units/fundamentalunits.py", line 26, in <module>
    from numpy import VisibleDeprecationWarning
ImportError: cannot import name 'VisibleDeprecationWarning' from 'numpy' (/home/peter/.local/lib/python3.12/site-packages/numpy/__init__.py)
 
Old 07-06-2024, 04:32 AM   #33
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,636

Rep: Reputation: 7525Reputation: 7525Reputation: 7525Reputation: 7525Reputation: 7525Reputation: 7525Reputation: 7525Reputation: 7525Reputation: 7525Reputation: 7525Reputation: 7525
it is the case when the issue is explained and without details we cannot say anything else, just repeat it.
Would be nice use use a consistent setup, what you currently have is useless. I would suggest you to create your own venv and use the official method to install brian: python -m pip install brian2
https://brian2.readthedocs.io/en/sta...n/install.html
 
2 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I got error while installing python-tk python-psycopg2 python-twisted saili kadam Linux - Newbie 1 09-05-2015 03:03 AM
LXer: Python Python Python (aka Python 3) LXer Syndicated Linux News 0 08-05-2009 08:30 PM
Errors, Errors, and more Errors (KDE 3.4.x GUI Errors) Dralnu Linux - Software 2 05-13-2006 08:30 AM
errors,errors,errors!!! randell6564 Mandriva 2 01-15-2006 02:29 AM
Grub errors...grub errors...grub errors smattmac Linux - Newbie 1 06-13-2005 02:07 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration