-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught exception of type NSException for Python 3+ #1
Comments
PS: for ubuntu, there are no these problems. |
PS: for window, it does work both for Python 2+ and Python 3+ as well. |
Thanks for bringing this up. It can be fixed by configuring matplotlib to use the
|
Yes and no, the configuration directory you provided is not suited for my case, but I use the line below to find the configuration directory, and after this, it works! Many thanks. First, one should obtain the correct matplotlib configuration directory: >>> import matplotlib as mpl
>>> print(mpl.get_configdir())
>>> '/Users/yxcheng/.matplotlib' Then, one should create a echo 'backend : agg' >> /Users/yxcheng/.matplotlib/matplotlibrc Finally, the output of (tinydft) YingxingdeMacBook-Pro:tinydft yxcheng$ python tinydft.py
Electronic configuration 1s2 2s2 2p6 3s2 3p6 4s2 3d3
Occupation numbers per ang. mom. [[2.0, 2.0, 2.0, 2.0], [6.0, 6.0], [3.0]]
Nuclear charge 23
Number of electrons 23.0
Maximum ang. mol. quantum number 2
Number of radial grid points 512
Number of basis functions 40
Condition number of the overlap 3.0e-11
Pre-computing some integrals ...
Number of SCF iterations 25
Mixing parameter 0.500
It Total Rad Kin Ang Kin Hartree XC Ext
=== ============ ============ ============ ============ ============ ============
0 (guess)
1 -146.297775 1000.378965 1098.895851 641.130224 -58.824864 -2827.877951
2 -416.503845 815.664496 789.082941 504.264268 -48.480019 -2477.035532
3 -505.716805 746.517142 665.655353 430.078499 -43.233462 -2304.734337
4 -527.025823 727.102634 630.966259 401.225205 -41.337644 -2244.982276
5 -529.730362 723.928996 626.288455 395.595669 -40.995804 -2234.547679
6 -529.937654 723.427688 626.116295 394.867815 -40.962420 -2233.387033
7 -530.087844 723.156703 625.953212 394.481200 -40.945293 -2232.733666
8 -530.179460 723.027680 625.861019 394.367285 -40.940645 -2232.494799
9 -530.240590 722.955912 625.788023 394.311675 -40.937903 -2232.358296
10 -530.272505 722.921117 625.749141 394.291411 -40.936785 -2232.297389
11 -530.288290 722.904257 625.729162 394.282042 -40.936216 -2232.267534
12 -530.295408 722.896581 625.720171 394.278368 -40.935977 -2232.254550
13 -530.298546 722.893085 625.716188 394.276733 -40.935868 -2232.248685
14 -530.299874 722.891531 625.714528 394.276064 -40.935822 -2232.246174
15 -530.300430 722.890837 625.713842 394.275769 -40.935802 -2232.245076
16 -530.300659 722.890529 625.713568 394.275644 -40.935793 -2232.244606
17 -530.300752 722.890392 625.713459 394.275589 -40.935790 -2232.244402
18 -530.300790 722.890330 625.713418 394.275565 -40.935788 -2232.244314
19 -530.300805 722.890302 625.713402 394.275554 -40.935787 -2232.244275
20 -530.300811 722.890290 625.713396 394.275549 -40.935787 -2232.244258
21 -530.300814 722.890284 625.713393 394.275547 -40.935787 -2232.244251
22 -530.300815 722.890281 625.713393 394.275546 -40.935787 -2232.244247
23 -530.300815 722.890280 625.713392 394.275545 -40.935787 -2232.244246
24 -530.300816 722.890279 625.713392 394.275545 -40.935787 -2232.244245 |
This problem is fixed with matplotlib version 3.1.0 (or newer), which are available on pip and (recently) also on conda. |
Hi Prof. Verstraelen:
There is an error when I run
python tinydft.py
in the Mac operating system, shown as follows:My Python environment is:
# Name Version Build Channel autograd 1.2 py_1 conda-forge blas 1.0 mkl defaults ca-certificates 2019.1.23 0 defaults certifi 2019.3.9 py37_0 defaults cycler 0.10.0 py37_0 defaults freetype 2.9.1 hb4e5f40_0 defaults future 0.17.1 py37_0 defaults intel-openmp 2019.3 199 defaults kiwisolver 1.1.0 py37h0a44026_0 defaults libcxx 4.0.1 hcfea43d_1 defaults libcxxabi 4.0.1 hcfea43d_1 defaults libedit 3.1.20181209 hb402a30_0 defaults libffi 3.2.1 h475c297_4 defaults libgfortran 3.0.1 h93005f0_2 defaults libpng 1.6.37 ha441bb4_0 defaults matplotlib 3.0.3 py37h54f8f79_0 defaults mkl 2019.3 199 defaults mkl_fft 1.0.12 py37h5e564d8_0 defaults mkl_random 1.0.2 py37h27c97d8_0 defaults ncurses 6.1 h0a44026_1 defaults numpy 1.16.3 py37hacdab7b_0 defaults numpy-base 1.16.3 py37h6575580_0 defaults openssl 1.1.1b h1de35cc_1 defaults pip 19.1.1 py37_0 defaults pyparsing 2.4.0 py_0 defaults python 3.7.3 h359304d_0 defaults python-dateutil 2.8.0 py37_0 defaults pytz 2019.1 py_0 defaults readline 7.0 h1de35cc_5 defaults scipy 1.2.1 py37h1410ff5_0 defaults setuptools 41.0.1 py37_0 defaults six 1.12.0 py37_0 defaults sqlite 3.28.0 ha441bb4_0 defaults tk 8.6.8 ha441bb4_0 defaults tornado 6.0.2 py37h1de35cc_0 defaults wheel 0.33.4 py37_0 defaults xz 5.2.4 h1de35cc_4 defaults zlib 1.2.11 h1de35cc_3 defaults
The text was updated successfully, but these errors were encountered: