Problem installation Pyneb

212 views
Skip to first unread message

Valentin Mauerhofer

unread,
Jun 7, 2023, 5:02:30 AM6/7/23
to py...@googlegroups.com
Hello,

Today I tried to upgrade PyNeb to the latest version with 
pip3 install --upgrade --user PyNeb

But I got an error, so I uninstalled PyNeb and now I cannot reinstall it. I get the same error:

pip install --user PyNeb 
Collecting PyNeb
  Using cached PyNeb-1.1.17.tar.gz (26.7 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  

  × Getting requirements to build wheel did not run successfully.
  exit code: 1
  ╰─> [23 lines of output]
      /private/var/folders/yr/7zwmlp0979d5h2dk7m2k53480000gn/T/pip-install-rhi95jwv/pyneb_d57d73d73c9a434c8715ffb6fb24c2f9/pyneb/utils/manage_atomic_data.py:483: SyntaxWarning: "is" with a literal. Did you mean "=="?
        if spec is '':
      Traceback (most recent call last):
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/private/var/folders/yr/7zwmlp0979d5h2dk7m2k53480000gn/T/pip-build-env-287b2sk4/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/private/var/folders/yr/7zwmlp0979d5h2dk7m2k53480000gn/T/pip-build-env-287b2sk4/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/yr/7zwmlp0979d5h2dk7m2k53480000gn/T/pip-build-env-287b2sk4/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 487, in run_setup
          super(_BuildMetaLegacyBackend,
        File "/private/var/folders/yr/7zwmlp0979d5h2dk7m2k53480000gn/T/pip-build-env-287b2sk4/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<string>", line 14, in <module>
        File "/private/var/folders/yr/7zwmlp0979d5h2dk7m2k53480000gn/T/pip-install-rhi95jwv/pyneb_d57d73d73c9a434c8715ffb6fb24c2f9/pyneb/__init__.py", line 19, in <module>
          from .utils.manage_atomic_data import _ManageAtomicData
        File "/private/var/folders/yr/7zwmlp0979d5h2dk7m2k53480000gn/T/pip-install-rhi95jwv/pyneb_d57d73d73c9a434c8715ffb6fb24c2f9/pyneb/utils/manage_atomic_data.py", line 3, in <module>
          import numpy as np
      ModuleNotFoundError: No module named 'numpy'
      [end of output]

  

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.





I tried to upgrade numpy, but nothing changes. And I dont encounter any problem with other python packages, I tried upgrading/installing astropy, scipy, ChiantiPy and I don’t have this problem.

Do you have any idea how I could fix this?

Thank you!
All the best,
Valentin Mauerhofer






Valentin Mauerhofer

unread,
Jun 7, 2023, 5:56:36 AM6/7/23
to py...@googlegroups.com
I forgot to mention that I work on a mac, with python3.10. Also, I always used the same environment, installing everything with pip3. I cannot find what could be the problem. 
It would be great if you have an idea of what to do!

Best,
Valentin

Christophe Morisset

unread,
Jun 7, 2023, 12:23:11 PM6/7/23
to PyNeb
Hi Valentin,
It seems numpy is not installed. But you say it is. Then it may be that pip is calling a version of python that is not the one where numpy is installed. From a terminal where you try to install pyneb, run the following commands:
which python
which pip
They both need to point to executables from the same directory. If this is not the case, install pip from the same terminal using the relevant command (may be conda install pip for example).
Hope it helps, all the best
Christophe

Nikko Cleri

unread,
Aug 2, 2024, 12:54:40 PM8/2/24
to PyNeb
Hi Christophe,

I am encountering the same problem as Valentin. I am on a new machine (macOS, using python 3.12) and getting the same error message when trying to install PyNeb. I checked the location of python3 and pip/pip3, they are in the same directory. Do you have any other suggestions?

Nikko

Ric Davies

unread,
Aug 29, 2024, 3:28:36 AM8/29/24
to PyNeb
you need numpy <2.0

Nikko Cleri

unread,
Aug 30, 2024, 9:27:27 AM8/30/24
to PyNeb
It seems like that was the issue - it worked with numpy 1.26.4. Thanks!

Livia Vallini

unread,
Oct 2, 2024, 5:20:28 AM10/2/24
to PyNeb
Hello,

I also experiencing the same problem when installing Pyneb (pip install -U PyNeb) in a new environment in which I have numpy 1.26.4 (as suggested in a previous reply in this thread I forced numpy to be <2.0). I use python 3.11, and I checked the location of python and pip, they are in the same directory.
This is the error I keep getting

Collecting pyneb==1.1.19

  Downloading PyNeb-1.1.19.tar.gz (26.7 MB)

     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 26.7/26.7 MB 11.7 MB/s eta 0:00:00

  Installing build dependencies ... done

  Getting requirements to build wheel ... error

  error: subprocess-exited-with-error

  

  × Getting requirements to build wheel did not run successfully.

  exit code: 1

  ╰─> [26 lines of output]

      /private/var/folders/3n/n8dp6s096_d5k7hkwbt7njf80000gn/T/pip-install-lb9iy0x_/pyneb_aaa441c727ee45f3bb6824584243cce1/pyneb/utils/manage_atomic_data.py:483: SyntaxWarning: "is" with a literal. Did you mean "=="?

        if spec is '':

      Traceback (most recent call last):

        File "/Users/livia/Desktop/Work/2024/piptests/glamenv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>

          main()

        File "/Users/livia/Desktop/Work/2024/piptests/glamenv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main

          json_out['return_val'] = hook(**hook_input['kwargs'])

                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

        File "/Users/livia/Desktop/Work/2024/piptests/glamenv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel

          return hook(config_settings)

                 ^^^^^^^^^^^^^^^^^^^^^

        File "/private/var/folders/3n/n8dp6s096_d5k7hkwbt7njf80000gn/T/pip-build-env-c_ct2kw0/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 332, in get_requires_for_build_wheel

          return self._get_build_requires(config_settings, requirements=[])

                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

        File "/private/var/folders/3n/n8dp6s096_d5k7hkwbt7njf80000gn/T/pip-build-env-c_ct2kw0/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 302, in _get_build_requires

          self.run_setup()

        File "/private/var/folders/3n/n8dp6s096_d5k7hkwbt7njf80000gn/T/pip-build-env-c_ct2kw0/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 503, in run_setup

          super().run_setup(setup_script=setup_script)

        File "/private/var/folders/3n/n8dp6s096_d5k7hkwbt7njf80000gn/T/pip-build-env-c_ct2kw0/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 318, in run_setup

          exec(code, locals())

        File "<string>", line 14, in <module>

        File "/private/var/folders/3n/n8dp6s096_d5k7hkwbt7njf80000gn/T/pip-install-lb9iy0x_/pyneb_aaa441c727ee45f3bb6824584243cce1/pyneb/__init__.py", line 14, in <module>

          from .utils.manage_atomic_data import _ManageAtomicData

        File "/private/var/folders/3n/n8dp6s096_d5k7hkwbt7njf80000gn/T/pip-install-lb9iy0x_/pyneb_aaa441c727ee45f3bb6824584243cce1/pyneb/utils/manage_atomic_data.py", line 3, in <module>

          import numpy as np

      ModuleNotFoundError: No module named 'numpy'

      [end of output]

  

  note: This error originates from a subprocess, and is likely not a problem with pip.

error: subprocess-exited-with-error


× Getting requirements to build wheel did not run successfully.

exit code: 1

╰─> See above for output.


note: This error originates from a subprocess, and is likely not a problem with pip.

Any idea on how to solve this problem? I never experienced this issue before a I managed to easily install Pyneb without too much troubles on my old laptop.

Thanks in advance!

Livia

Federico Esposito

unread,
Oct 2, 2024, 9:46:17 AM10/2/24
to PyNeb
Hi,

I have the same error reported by Livia when trying to install PyNeb, both from a conda environment and from a venv environment.
I tried with Python 3.10.14, trying to install PyNeb in pristine environments containing only the last version of the pip package.

I have found that:
- within a conda environment, I can correctly install PyNeb only if I install numpy and scipy before (without specifying the package versions)
- within a venv environment, in no way I am able to install PyNeb, even if I install numpy=1.26.4 before

This changes if I already have a cached version of PyNeb in my computer (so dropping the --no-cache option when installing).
In that case I can install PyNeb without having to install numpy separately before, both within conda and venv environments.

Thanks in advance,
Federico

William Henney

unread,
Nov 27, 2024, 11:25:10 AM11/27/24
to PyNeb
Hi everyone

I ran into the same problem with installing PyNeb, but I have found the solution.  The issue is that newer versions of pip (and other installation tools) default to using an isolated build environment. However, PyNeb does not currently provide the information on build dependencies that pip would need for this. As a result, we are seeing these errors about numpy not being found. 

So, the simplest workaround is to tell pip to revert to the old way of doing things. For instance:

$ python -m pip install --no-build-isolation pyneb

If you are doing this in a new empty environment, you may need to install setuptools, numpy, and scipy first. 

If you are using uv instead of pip, then you just need to add the following to pyproject.toml

[tool.uv]
no-build-isolation-package = ["pyneb"]


For a proper fix, Christophe will need to update the configuration of the package, as described here:


Hope this helps.

Cheers

Will

--
William Henney, Instituto de Radioastronomía y Astrofísica,
Universidad Nacional Autónoma de México, Campus Morelia

Christophe Morisset

unread,
Dec 3, 2024, 8:38:10 PM12/3/24
to PyNeb
Hi,
I'm trying to reproduce the problem, to eventually modernize my setup installation, but I do not succeed. 
I installed everything in a new environment:

conda create --name testPN numpy scipy matplotlib ipython

it says that conda is out of date, but I can not update it, so I keep it as it is (and it works, I do not fix it ;-) ).
The packages installed in this environment are:

The following NEW packages will be INSTALLED:

  asttokens          pkgs/main/noarch::asttokens-2.0.5-pyhd3eb1b0_0
  blas               pkgs/main/osx-64::blas-1.0-openblas
  brotli             pkgs/main/osx-64::brotli-1.0.9-h6c40b1e_8
  brotli-bin         pkgs/main/osx-64::brotli-bin-1.0.9-h6c40b1e_8
  bzip2              pkgs/main/osx-64::bzip2-1.0.8-h6c40b1e_6
  ca-certificates    pkgs/main/osx-64::ca-certificates-2024.11.26-hecd8cb5_0
  contourpy          pkgs/main/osx-64::contourpy-1.3.1-py312h1962661_0
  cycler             pkgs/main/noarch::cycler-0.11.0-pyhd3eb1b0_0
  decorator          pkgs/main/noarch::decorator-5.1.1-pyhd3eb1b0_0
  executing          pkgs/main/noarch::executing-0.8.3-pyhd3eb1b0_0
  expat              pkgs/main/osx-64::expat-2.6.3-h6d0c2b6_0
  fonttools          pkgs/main/osx-64::fonttools-4.51.0-py312h6c40b1e_0
  freetype           pkgs/main/osx-64::freetype-2.12.1-hd8bbffd_0
  ipython            pkgs/main/osx-64::ipython-8.27.0-py312hecd8cb5_0
  jedi               pkgs/main/osx-64::jedi-0.19.1-py312hecd8cb5_0
  jpeg               pkgs/main/osx-64::jpeg-9e-h46256e1_3
  kiwisolver         pkgs/main/osx-64::kiwisolver-1.4.4-py312hcec6c5f_0
  lcms2              pkgs/main/osx-64::lcms2-2.12-hf1fd2bf_0
  lerc               pkgs/main/osx-64::lerc-3.0-he9d5cce_0
  libbrotlicommon    pkgs/main/osx-64::libbrotlicommon-1.0.9-h6c40b1e_8
  libbrotlidec       pkgs/main/osx-64::libbrotlidec-1.0.9-h6c40b1e_8
  libbrotlienc       pkgs/main/osx-64::libbrotlienc-1.0.9-h6c40b1e_8
  libcxx             pkgs/main/osx-64::libcxx-14.0.6-h9765a3e_0
  libdeflate         pkgs/main/osx-64::libdeflate-1.17-hb664fd8_1
  libffi             pkgs/main/osx-64::libffi-3.4.4-hecd8cb5_1
  libgfortran        pkgs/main/osx-64::libgfortran-5.0.0-11_3_0_hecd8cb5_28
  libgfortran5       pkgs/main/osx-64::libgfortran5-11.3.0-h9dfd629_28
  libopenblas        pkgs/main/osx-64::libopenblas-0.3.21-h54e7dc3_0
  libpng             pkgs/main/osx-64::libpng-1.6.39-h6c40b1e_0
  libtiff            pkgs/main/osx-64::libtiff-4.5.1-hcec6c5f_0
  libwebp-base       pkgs/main/osx-64::libwebp-base-1.3.2-h46256e1_1
  llvm-openmp        pkgs/main/osx-64::llvm-openmp-14.0.6-h0dcd299_0
  lz4-c              pkgs/main/osx-64::lz4-c-1.9.4-hcec6c5f_1
  matplotlib         pkgs/main/osx-64::matplotlib-3.9.2-py312hecd8cb5_1
  matplotlib-base    pkgs/main/osx-64::matplotlib-base-3.9.2-py312h919b35b_1
  matplotlib-inline  pkgs/main/osx-64::matplotlib-inline-0.1.6-py312hecd8cb5_0
  ncurses            pkgs/main/osx-64::ncurses-6.4-hcec6c5f_0
  numpy              pkgs/main/osx-64::numpy-2.1.3-py312h255ab90_0
  numpy-base         pkgs/main/osx-64::numpy-base-2.1.3-py312h12d8432_0
  openjpeg           pkgs/main/osx-64::openjpeg-2.5.2-hbf2204d_0
  openssl            pkgs/main/osx-64::openssl-3.0.15-h46256e1_0
  packaging          pkgs/main/osx-64::packaging-24.1-py312hecd8cb5_0
  parso              pkgs/main/noarch::parso-0.8.3-pyhd3eb1b0_0
  pexpect            pkgs/main/noarch::pexpect-4.8.0-pyhd3eb1b0_3
  pillow             pkgs/main/osx-64::pillow-11.0.0-py312h9c91434_0
  pip                pkgs/main/osx-64::pip-24.2-py312hecd8cb5_0
  prompt-toolkit     pkgs/main/osx-64::prompt-toolkit-3.0.43-py312hecd8cb5_0
  prompt_toolkit     pkgs/main/noarch::prompt_toolkit-3.0.43-hd3eb1b0_0
  ptyprocess         pkgs/main/noarch::ptyprocess-0.7.0-pyhd3eb1b0_2
  pure_eval          pkgs/main/noarch::pure_eval-0.2.2-pyhd3eb1b0_0
  pygments           pkgs/main/osx-64::pygments-2.15.1-py312hecd8cb5_1
  pyparsing          pkgs/main/osx-64::pyparsing-3.2.0-py312hecd8cb5_0
  python             pkgs/main/osx-64::python-3.12.7-hcd54a6c_0
  python-dateutil    pkgs/main/osx-64::python-dateutil-2.9.0post0-py312hecd8cb5_2
  readline           pkgs/main/osx-64::readline-8.2-hca72f7f_0
  scipy              pkgs/main/osx-64::scipy-1.14.1-py312hff39f35_0
  setuptools         pkgs/main/osx-64::setuptools-72.1.0-py312hecd8cb5_0
  six                pkgs/main/noarch::six-1.16.0-pyhd3eb1b0_1
  sqlite             pkgs/main/osx-64::sqlite-3.45.3-h6c40b1e_0
  stack_data         pkgs/main/noarch::stack_data-0.2.0-pyhd3eb1b0_0
  tk                 pkgs/main/osx-64::tk-8.6.14-h4d00af3_0
  tornado            pkgs/main/osx-64::tornado-6.4.1-py312h46256e1_0
  traitlets          pkgs/main/osx-64::traitlets-5.14.3-py312hecd8cb5_0
  tzdata             pkgs/main/noarch::tzdata-2024b-h04d1e81_0
  unicodedata2       pkgs/main/osx-64::unicodedata2-15.1.0-py312h6c40b1e_0
  wcwidth            pkgs/main/noarch::wcwidth-0.2.5-pyhd3eb1b0_0
  wheel              pkgs/main/osx-64::wheel-0.44.0-py312hecd8cb5_0
  xz                 pkgs/main/osx-64::xz-5.4.6-h6c40b1e_1
  zlib               pkgs/main/osx-64::zlib-1.2.13-h4b97444_1
  zstd               pkgs/main/osx-64::zstd-1.5.6-h138b38a_0


Then:
conda activate testPN         
pip install -U pyneb

and everything went well...

Collecting pyneb
  Downloading PyNeb-1.1.22.tar.gz (26.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 26.7/26.7 MB 9.2 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: pyneb
  Building wheel for pyneb (setup.py) ... done
  Created wheel for pyneb: filename=PyNeb-1.1.22-py3-none-any.whl size=27529849 sha256=02bea45b3c0be6f504786d9062c283cea88f3e2c0b842674369fd81330a30d60
  Stored in directory: /Users/christophemorisset/Library/Caches/pip/wheels/f2/54/fd/162f2e0d6f590ad31f795f5d87e9bc96cc34a53b9f0c63f8dd
Successfully built pyneb
Installing collected packages: pyneb
Successfully installed pyneb-1.1.22

I tried to do a new version of PyNeb using the toml setup, but not sure it solves the pb, as I do not have it. Could somebody with the issue try this:


Thanks a lot,
Christophe

William Henney

unread,
Dec 3, 2024, 11:33:25 PM12/3/24
to PyNeb
Hi Christophe

That new version fixes the problem for me using my preferred tooling (uv), thanks!!!. 

I copy my install log below. I did get some warnings on import. Looks like some strings with backslashes need to be marked as raw: e.g., r"\Omega". I'm guessing these warnings must be new in python 3.12

As to why you cannot reproduce the problem, I'm not sure. Federico Esposito reported that the problem did not arise in conda, so long as the prerequisites were installed first.  Maybe the version of pip that you are using is older?

Cheers

Will

# will @ gris in ~/tmp [21:58:01]
$ mkdir pyneb-test-fix

# will @ gris in ~/tmp [21:58:16]
$ cd pyneb-test-fix

Create new virtual environment with uv

# will @ gris in ~/tmp/pyneb-test-fix [21:58:25]
$ uv venv
Using CPython 3.12.6
Creating virtual environment at: .venv
Activate with: source .venv/bin/activate

Install prerequisites

# will @ gris in ~/tmp/pyneb-test-fix [21:58:55]
$ uv pip install numpy scipy matplotlib ipython
Resolved 27 packages in 1.66s
Prepared 4 packages in 1.06s
Installed 27 packages in 598ms
 + asttokens==3.0.0
 + contourpy==1.3.1
 + cycler==0.12.1
 + decorator==5.1.1
 + executing==2.1.0
 + fonttools==4.55.1
 + ipython==8.30.0
 + jedi==0.19.2
 + kiwisolver==1.4.7
 + matplotlib==3.9.3
 + matplotlib-inline==0.1.7
 + numpy==2.1.3
 + packaging==24.2
 + parso==0.8.4
 + pexpect==4.9.0
 + pillow==11.0.0
 + prompt-toolkit==3.0.48
 + ptyprocess==0.7.0
 + pure-eval==0.2.3
 + pygments==2.18.0
 + pyparsing==3.2.0
 + python-dateutil==2.9.0.post0
 + scipy==1.14.1
 + six==1.16.0
 + stack-data==0.6.3
 + traitlets==5.14.3
 + wcwidth==0.2.13

Install new version of pyneb from the toml_setup branch on github

# will @ gris in ~/tmp/pyneb-test-fix [21:59:44]
$ uv pip install git+https://github.com/Morisset/PyNeb_devel.git@toml_setup
 Updated https://github.com/Morisset/PyNeb_devel.git (c13a695)
Resolved 13 packages in 9.75s
   Built pyneb @ git+https://github.com/Morisset/PyNeb_devel.git@c13a695bcfdc2eb4ea5
Prepared 1 package in 6.49s
Installed 1 package in 25ms
 + pyneb==1.1.23b1 (from git+https://github.com/Morisset/PyNeb_devel.git@c13a695bcfdc2eb4ea5390cde444b21cb4474a8c)

Activate environment and check that pyneb works:

# will @ gris in ~/tmp/pyneb-test-fix [22:00:40]
$ source .venv/bin/activate
(pyneb-test-fix)
# will @ gris in ~/tmp/pyneb-test-fix .venv [22:08:37]
$ python
Python 3.12.6 (main, Sep  9 2024, 21:33:51) [Clang 18.1.8 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyneb as pn
/Users/will/tmp/pyneb-test-fix/.venv/lib/python3.12/site-packages/pyneb/utils/manage_atomic_data.py:483: SyntaxWarning: "is" with 'str' literal. Did you mean "=="?
  if spec is '':
/Users/will/tmp/pyneb-test-fix/.venv/lib/python3.12/site-packages/pyneb/utils/pn_chianti.py:73: SyntaxWarning: invalid escape sequence '\*'
  remove_stars = lambda str: re.sub('\*','', str)
/Users/will/tmp/pyneb-test-fix/.venv/lib/python3.12/site-packages/pyneb/utils/pn_chianti.py:75: SyntaxWarning: invalid escape sequence '\.'
  change_2pto1p = lambda str: re.sub('\.\.', '.', str)
/Users/will/tmp/pyneb-test-fix/.venv/lib/python3.12/site-packages/pyneb/utils/pn_chianti.py:76: SyntaxWarning: invalid escape sequence '\.'
  change_2pto0p = lambda str: re.sub('\.\.', '', str)
/Users/will/tmp/pyneb-test-fix/.venv/lib/python3.12/site-packages/pyneb/utils/pn_chianti.py:77: SyntaxWarning: invalid escape sequence '\.'
  remove_point_before_par = lambda str: re.sub('\.\(', '(', str)
/Users/will/tmp/pyneb-test-fix/.venv/lib/python3.12/site-packages/pyneb/utils/pn_chianti.py:79: SyntaxWarning: invalid escape sequence '\.'
  change_ptpsp = lambda str: re.sub('\.', ' ', str)
/Users/will/tmp/pyneb-test-fix/.venv/lib/python3.12/site-packages/pyneb/plot/plotAtomicData.py:446: SyntaxWarning: invalid escape sequence '\O'
  lbl = "$\Omega$" + "(" + str(j) + "," + str(i) + ")"
/Users/will/tmp/pyneb-test-fix/.venv/lib/python3.12/site-packages/pyneb/plot/plotAtomicData.py:463: SyntaxWarning: invalid escape sequence '\O'
  fig.text(.05, .5, "$\Omega$", va='center', fontsize=20, rotation=90)
>>> o3 = pn.Atom("O", 3)
>>> o3.getTransition(5007)

(np.int64(4), np.int64(3))
>>>

Christophe Morisset

unread,
Dec 4, 2024, 4:49:21 PM12/4/24
to PyNeb
I released a new version 1.1.23, see the corresponding message. It is now possible to install pyneb from a brand new environment (that at least have pip), and it will install numpy etc if not there.
Please report any problem that would not be solved with this release.
Thanks for the help,
Christophe

Letizia Stanghellini

unread,
Jan 29, 2025, 12:48:24 PMJan 29
to PyNeb
I have installed the new version of pyneb. I am running Montecarlo with ANN in the notebook, and I give the command 
pn.import_AI4Neb()
But it gives: 
AttributeError: module 'pyneb' has no attribute 'import_AI4Neb'  In the old program I had pn.config.import_ai4neb() which worked then but does not work now.  Any ideas?
Thanks Christophe!
Letizia

Christophe Morisset

unread,
Jan 29, 2025, 12:51:47 PMJan 29
to PyNeb
Hi Letizia,
Sorry for that, the calling sequence changed, it is now:
pn.config.import_AI4Neb()

Hope this solve the issue,
Saludos,
Ch.

Letizia Stanghellini

unread,
Jan 29, 2025, 1:24:04 PMJan 29
to PyNeb
thank you! Yes it works now.
Reply all
Reply to author
Forward
0 new messages