- attached install_git.txt
Yet another "Unable to install matplotlib"
I cannot install matplotlib for python3.
I tried pip3 with git and pypi but neither worked.
- pip3 for git → install_git.txt
pip3 install git+https://github.com/matplotlib/matplotlib.git
- pip3 for pypi → install_pypi.org.txt
pip3 install https://files.pythonhosted.org/packages/4a/30/eb8e7dd8e3609f05c6920fa82f189302c832e5a0f6667aa96f952056bc0c/matplotlib-3.2.1.tar.gz
Any help would be greatly appreciated.
uzaemon@Japan
Comments (22)
-
reporter -
reporter - attached install_pypi.org.txt
-
reporter - attached yum_list.txt
-
reporter - attached pip3_list.txt
-
You are missing the PASE header files on that system. You will need to install 5770-SS1 option 13 “System Openness Includes”
-
reporter Thank you for your reply.
“5770-SS1 option 13” is installed.
$ system dspsfwrsc (SNIP) 5770SS1 13 5050 *CODE QSYSINC V7R4M0 システム・オープンの組み込み (SNIP) 5770SS1 33 5111 *CODE QPASE V7R4M0 PORTABLE APP SOLUTIONS ENVIRONMENT 5770SS1 33 2962 *LNG QPASE V7R4M0 PORTABLE APP SOLUTIONS ENVIRONMENT (SNIP) 5733SC1 1 5050 *CODE QUTL V7R2M0 OPENSSH, OPENSSL, ZLIB (SNIP) 5770WDS 56 5101 *CODE QDEVTOOLS V7R4M0 IXLC FOR C/C++
I don’t know but it looks like the errors are related to freetype in logs.
Please let me know if you have any ideas. -
Looks like the error is from
/QOpenSys/pkgs/lib/python3.6/config-3.6m/ld_so_aix g++ -pthread -pthread -bI:/QOpenSys/pkgs/lib/python3.6/config-3.6m/python.exp -Wl,-blibpath:/QOpenSys/pkgs/lib:/QOpenSys/usr/lib build/temp.os400-powerpc64-3.6/src/checkdep_freetype2.o build/temp.os400-powerpc64-3.6/src/ft2font.o build/temp.os400-powerpc64-3.6/src/ft2font_wrapper.o build/temp.os400-powerpc64-3.6/src/mplutils.o build/temp.os400-powerpc64-3.6/src/py_converters.o -L/QOpenSys/pkgs/lib -o build/lib.os400-powerpc64-3.6/matplotlib/ft2font.so -L/QOpenSys/pkgs/lib -lfreetype ld: 0711-418 ERROR: Import or export file ft2font.exp at line 66: A symbol name may only be followed by an export attribute or an address. The line is being ignored. ld: 0711-418 ERROR: Import or export file ft2font.exp at line 67: A symbol name may only be followed by an export attribute or an address. The line is being ignored. ld: 0711-418 ERROR: Import or export file ft2font.exp at line 68: A symbol name may only be followed by an export attribute or an address. The line is being ignored. ld: 0711-418 ERROR: Import or export file ft2font.exp at line 69: A symbol name may only be followed by an export attribute or an address. The line is being ignored. ld: 0711-418 ERROR: Import or export file ft2font.exp at line 70: A symbol name may only be followed by an export attribute or an address. The line is being ignored. ld: 0711-418 ERROR: Import or export file ft2font.exp at line 71: A symbol name may only be followed by an export attribute or an address. The line is being ignored. collect2: error: ld returned 8 exit status error: command '/QOpenSys/pkgs/lib/python3.6/config-3.6m/ld_so_aix' failed with exit status 1
For some reason ft2font.exp is being generated with invalid attributes by ld_so_aix. I’ll take a look.
-
reporter I’ll take a look.
Thank you for your support.
Matplotlib is very popular visualization library for python and most python environments support it.
It will be a great complement to the character-based 5250 applications. -
Installing freetype-devel and pkg-config with yum should fix this problem.
-
Here’s a details instructions on how to setup the ML env on your system, including the matplotlib and jupyter notebook. I would think all the necessary packages required by ML are there. thx.
-
hmmm. A pity , seems I missed one package on that publish, please “yum install zlib-devel” as well before you try matplotlib. thx.
-
reporter Zhang-san,
Thank you for your suggestion.
All libraries mentioned at “Set Up the Matplotlib Environment“ have been installed and current as shown in attachment “yum_list.txt”.Adler-san,
I checked library updates by ACS OSPM and there are no update to libraries you pointed.
To make sure, I ran yum again.
* Run “export OBJECT_MODE=64“ did not affect to the error status.bash-4.4$ yum install freetype-devel pkg-config zlib-devel Setting up Install Process Package freetype-devel-2.10.1-1.ppc64 already installed and latest version Package pkg-config-0.29.2-1.ppc64 already installed and latest version Package zlib-devel-1.2.11-3.ppc64 already installed and latest version Nothing to do
Then I tried to install matplotlib but seems like it reports the same error.
bash-4.4$ pip3 install matplotlib Collecting matplotlib Using cached https://files.pythonhosted.org/packages/4a/30/eb8e7dd8e3609f05c6920fa82f189302c832e5a0f6667aa96f952056bc0c/matplotlib-3.2.1.tar.gz Requirement already satisfied: cycler>=0.10 in /QOpenSys/pkgs/lib/python3.6/site-packages (from matplotlib) Requirement already satisfied: kiwisolver>=1.0.1 in /QOpenSys/pkgs/lib/python3.6/site-packages (from matplotlib) Requirement already satisfied: numpy>=1.11 in /QOpenSys/pkgs/lib/python3.6/site-packages (from matplotlib) Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /QOpenSys/pkgs/lib/python3.6/site-packages (from matplotlib) Requirement already satisfied: python-dateutil>=2.1 in /QOpenSys/pkgs/lib/python3.6/site-packages (from matplotlib) Requirement already satisfied: six in /QOpenSys/pkgs/lib/python3.6/site-packages (from cycler>=0.10->matplotlib) Building wheels for collected packages: matplotlib Running setup.py bdist_wheel for matplotlib ... error Complete output from command /QOpenSys/pkgs/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-l9lbd5fy/matplotlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp0foyu647pip-wheel- --python-tag cp36: Edit setup.cfg to change the build options; suppress output with --quiet. (SNIP) gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -O2 -g -maix64 -O2 -g -maix64 -fPIC -DFREETYPE_BUILD_TYPE=system -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -Iextern/agg24-svn/include -I/QOpenSys/pkgs/lib/python3.6/site-packages/numpy/core/include -I/QOpenSys/pkgs/include/python3.6m -c src/py_converters.cpp -o build/temp.os400-powerpc64-3.6/src/py_converters.o -I/QOpenSys/pkgs/include/freetype2 /QOpenSys/pkgs/lib/python3.6/config-3.6m/ld_so_aix g++ -pthread -pthread -bI:/QOpenSys/pkgs/lib/python3.6/config-3.6m/python.exp -Wl,-blibpath:/QOpenSys/pkgs/lib:/QOpenSys/usr/lib build/temp.os400-powerpc64-3.6/src/checkdep_freetype2.o build/temp.os400-powerpc64-3.6/src/ft2font.o build/temp.os400-powerpc64-3.6/src/ft2font_wrapper.o build/temp.os400-powerpc64-3.6/src/mplutils.o build/temp.os400-powerpc64-3.6/src/py_converters.o -L/QOpenSys/pkgs/lib -o build/lib.os400-powerpc64-3.6/matplotlib/ft2font.so -L/QOpenSys/pkgs/lib -lfreetype ld: 0711-418 ERROR: Import or export file ft2font.exp at line 66: A symbol name may only be followed by an export attribute or an address. The line is being ignored. ld: 0711-418 ERROR: Import or export file ft2font.exp at line 67: A symbol name may only be followed by an export attribute or an address. The line is being ignored. ld: 0711-418 ERROR: Import or export file ft2font.exp at line 68: A symbol name may only be followed by an export attribute or an address. The line is being ignored. ld: 0711-418 ERROR: Import or export file ft2font.exp at line 69: A symbol name may only be followed by an export attribute or an address. The line is being ignored. ld: 0711-418 ERROR: Import or export file ft2font.exp at line 70: A symbol name may only be followed by an export attribute or an address. The line is being ignored. ld: 0711-418 ERROR: Import or export file ft2font.exp at line 71: A symbol name may only be followed by an export attribute or an address. The line is being ignored. collect2: error: ld returned 8 exit status error: command '/QOpenSys/pkgs/lib/python3.6/config-3.6m/ld_so_aix' failed with exit status 1 ---------------------------------------- Command "/QOpenSys/pkgs/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-l9lbd5fy/matplotlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-v5bkczt1-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-l9lbd5fy/matplotlib/ bash-4.4$
I appreciate your help and looking forward to hearing another solution.
-
I noticed that you are on i 7.4. I tried a recreate from a clean system. I can also hit this error on my 7.4 system now. I would take a look.
In case , you have any 7.2 system, you can make a try there to avoid waiting on me. I did a v7r2 verification early of this week, which worked very well.
-
reporter Zhang-san,
Thank you very much for your update.
Unfortunately, I don’t have 7.2 system so waiting for your suggestion.Your support is much appreciated.
-
Account Deleted I updated Python today and got different error during installation of matplotlib.
Any idea?In the meantime, we can use Altair and folium sucsessfully.
See https://youtu.be/vl2u_TjttFg?t=802 if you are interested.
Remember to show caption and set YouTube setting to translate to your language.uzaemon@Japan
-
Account Deleted
bash-4.4$ pip3 install matplotlib Collecting matplotlib Downloading https://files.pythonhosted.org/packages/7d/d4/e4c40c62cd8608ca09f0684e64139c56512e195f2351ac41a472d4dc8b38/matplotlib-3.3.0.tar.gz (38.8MB) 100% |################################| 38.8MB 22kB/s Requirement already satisfied: cycler>=0.10 in /QOpenSys/pkgs/lib/python3.6/site-packages (from matplotlib) Requirement already satisfied: kiwisolver>=1.0.1 in /QOpenSys/pkgs/lib/python3.6/site-packages (from matplotlib) Requirement already satisfied: numpy>=1.15 in /QOpenSys/pkgs/lib/python3.6/site-packages (from matplotlib) Requirement already satisfied: pillow>=6.2.0 in /QOpenSys/pkgs/lib/python3.6/site-packages (from matplotlib) Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in /QOpenSys/pkgs/lib/python3.6/site-packages (from matplotlib) Requirement already satisfied: python-dateutil>=2.1 in /QOpenSys/pkgs/lib/python3.6/site-packages (from matplotlib) Requirement already satisfied: six in /QOpenSys/pkgs/lib/python3.6/site-packages (from cycler>=0.10->matplotlib) Building wheels for collected packages: matplotlib Running setup.py bdist_wheel for matplotlib ... error Complete output from command /QOpenSys/pkgs/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-rx_mbyrt/matplotlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpv3r9lkdupip-wheel- --python-tag cp36: Edit setup.cfg to change the build options; suppress output with --quiet. BUILDING MATPLOTLIB matplotlib: yes [3.3.0] python: yes [3.6.10 (default, Jul 20 2020, 09:04:05) [GCC 6.3.0]] platform: yes [aix7] sample_data: yes [installing] tests: no [skipping due to configuration] macosx: no [Mac OS-X only] (SNIP) gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -O2 -g -maix64 -O2 -g -maix64 -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__backend_agg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -DFREETYPE_BUILD_TYPE=system -Iextern/agg24-svn/include -I/QOpenSys/pkgs/lib/python3.6/site-packages/numpy/core/include -I/QOpenSys/pkgs/include/python3.6m -c extern/agg24-svn/src/agg_vpgen_segmentator.cpp -o build/temp.os400-powerpc64-3.6/extern/agg24-svn/src/agg_vpgen_segmentator.o -I/QOpenSys/pkgs/include/freetype2 -fvisibility=hidden extern/agg24-svn/src/agg_vpgen_segmentator.cpp: In member function 'void agg::vpgen_segmentator::move_to(double, double)': extern/agg24-svn/src/agg_vpgen_segmentator.cpp:31:5: warning: visibility attribute not supported in this configuration; ignored [-Wattributes] } ^ extern/agg24-svn/src/agg_vpgen_segmentator.cpp: In member function 'void agg::vpgen_segmentator::line_to(double, double)': extern/agg24-svn/src/agg_vpgen_segmentator.cpp:44:5: warning: visibility attribute not supported in this configuration; ignored [-Wattributes] } ^ extern/agg24-svn/src/agg_vpgen_segmentator.cpp: In member function 'unsigned int agg::vpgen_segmentator::vertex(double*, double*)': extern/agg24-svn/src/agg_vpgen_segmentator.cpp:64:5: warning: visibility attribute not supported in this configuration; ignored [-Wattributes] } ^ /QOpenSys/pkgs/lib/python3.6/config-3.6m/ld_so_aix g++ -pthread -pthread -bI:/QOpenSys/pkgs/lib/python3.6/config-3.6m/python.exp -Wl,-blibpath:/QOpenSys/pkgs/lib:/QOpenSys/usr/lib build/temp.os400-powerpc64-3.6/src/checkdep_freetype2.o build/temp.os400-powerpc64-3.6/src/mplutils.o build/temp.os400-powerpc64-3.6/src/py_converters.o build/temp.os400-powerpc64-3.6/src/_backend_agg.o build/temp.os400-powerpc64-3.6/src/_backend_agg_wrapper.o build/temp.os400-powerpc64-3.6/extern/agg24-svn/src/agg_bezier_arc.o build/temp.os400-powerpc64-3.6/extern/agg24-svn/src/agg_curves.o build/temp.os400-powerpc64-3.6/extern/agg24-svn/src/agg_image_filters.o build/temp.os400-powerpc64-3.6/extern/agg24-svn/src/agg_trans_affine.o build/temp.os400-powerpc64-3.6/extern/agg24-svn/src/agg_vcgen_contour.o build/temp.os400-powerpc64-3.6/extern/agg24-svn/src/agg_vcgen_dash.o build/temp.os400-powerpc64-3.6/extern/agg24-svn/src/agg_vcgen_stroke.o build/temp.os400-powerpc64-3.6/extern/agg24-svn/src/agg_vpgen_segmentator.o -L/QOpenSys/pkgs/lib -o build/lib.os400-powerpc64-3.6/matplotlib/backends/_backend_agg.so -L/QOpenSys/pkgs/lib -lfreetype ld: 0711-418 ERROR: Import or export file _backend_agg.exp at line 39: A symbol name may only be followed by an export attribute or an address. The line is being ignored. ld: 0711-418 ERROR: Import or export file _backend_agg.exp at line 40: A symbol name may only be followed by an export attribute or an address. The line is being ignored. ld: 0711-418 ERROR: Import or export file _backend_agg.exp at line 41: A symbol name may only be followed by an export attribute or an address. The line is being ignored. ld: 0711-418 ERROR: Import or export file _backend_agg.exp at line 42: A symbol name may only be followed by an export attribute or an address. The line is being ignored. ld: 0711-418 ERROR: Import or export file _backend_agg.exp at line 43: A symbol name may only be followed by an export attribute or an address. The line is being ignored. ld: 0711-418 ERROR: Import or export file _backend_agg.exp at line 44: A symbol name may only be followed by an export attribute or an address. The line is being ignored. collect2: error: ld returned 8 exit status error: command '/QOpenSys/pkgs/lib/python3.6/config-3.6m/ld_so_aix' failed with exit status 1 ---------------------------------------- Command "/QOpenSys/pkgs/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-rx_mbyrt/matplotlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-7e7o79jv-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-rx_mbyrt/matplotlib/ bash-4.4$
-
How did you know a new python3 is available? I really opened an internal defect for python3, which would fix one issue in makexp_aix tools in python3. But that defect has not been fixed yet. It’s really related to the .exp files generated by that tool, which is similar as what you found . So, let’s wait for the fix and see whether it would also fix this issue in _backend_agg.exp.
-
reporter Hello,
How did you know a new python3 is available?
I just ran opensource package management of ACS and found that updates for Python3 are available.
So I updated Python3 (and other OSSs) as a trial.So, let’s wait for the fix and see whether it would also fix this issue in _backend_agg.exp.
I see.
I’ll be watching fix for the problem.uzaemon@Japan
-
Today, I got an internal report with same error as yours on _backend_agg.exp file. I can confirm that this is the exact same issue as what I have found. So, the fix could also fix this issue as well.
As I can not see the target date of the fix , I would think you can try a local change if you like.
The bug is from this file: /QOpenSys/pkgs/lib/python3.6/config-3.6m/makexp_aix, which is a script .
You can just add a “-C” option in this script for the nm line.
From:
/QOpenSys/usr/bin/nm -Bex -X32_64 $* \ | sed -e '/ [^BDT] /d' -e '/\./d' -e 's/.* [BDT] //' -e '/::/d' \ | sort | uniq ) > $expFileName
to:
/QOpenSys/usr/bin/nm -C -Bex -X32_64 $* \ | sed -e '/ [^BDT] /d' -e '/\./d' -e 's/.* [BDT] //' -e '/::/d' \ | sort | uniq ) > $expFileName
-
The latest Python build has the fix that @Gavin Gan Zhang posted previously.
-
reporter I installed python3 3.6.10-6 and matplotlib works now!
Thank you for all your assistance.$ PATH=/QOpenSys/pkgs/bin:$PATH $ export PATH $ bash bash-4.4$ pip3 install matplotlib Collecting matplotlib Downloading https://files.pythonhosted.org/packages/58/bd/d3b13e93c01226901ceb50a14c110b5722f446e456f7f4fd7fd231b33742/matplotlib-3.3.1.tar.gz (38.8MB) 100% |################################| 38.8MB 22kB/s Collecting certifi>=2020.06.20 (from matplotlib) Downloading https://files.pythonhosted.org/packages/5e/c4/6c4fe722df5343c33226f0b4e0bb042e4dc13483228b4718baf286f86d87/certifi-2020.6.20-py2.py3-none-any.whl (156kB) 100% |################################| 163kB 1.0MB/s Requirement already satisfied: cycler>=0.10 in /QOpenSys/pkgs/lib/python3.6/site-packages (from matplotlib) Requirement already satisfied: kiwisolver>=1.0.1 in /QOpenSys/pkgs/lib/python3.6/site-packages (from matplotlib) Requirement already satisfied: numpy>=1.15 in /QOpenSys/pkgs/lib/python3.6/site-packages (from matplotlib) Requirement already satisfied: pillow>=6.2.0 in /QOpenSys/pkgs/lib/python3.6/site-packages (from matplotlib) Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in /QOpenSys/pkgs/lib/python3.6/site-packages (from matplotlib) Requirement already satisfied: python-dateutil>=2.1 in /QOpenSys/pkgs/lib/python3.6/site-packages (from matplotlib) Requirement already satisfied: six in /QOpenSys/pkgs/lib/python3.6/site-packages (from cycler>=0.10->matplotlib) Building wheels for collected packages: matplotlib Running setup.py bdist_wheel for matplotlib ... done Stored in directory: /home/YAHAGI/.cache/pip/wheels/34/c6/b9/f53ef71855a49ada4740787cbf92943d580ea43e32ff228ba3 Successfully built matplotlib Installing collected packages: certifi, matplotlib Found existing installation: certifi 2020.4.5.2 Uninstalling certifi-2020.4.5.2: Successfully uninstalled certifi-2020.4.5.2 Successfully installed certifi-2020.6.20 matplotlib-3.3.1 bash-4.4$ cat matplotlib_test.py import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt x = np.linspace(-np.pi, np.pi) y1 = np.sin(x) y2 = np.cos(x) fig = plt.figure() ax = fig.add_subplot(1, 1, 1) # plot ax.plot(x, y1, linestyle='--', color='b', label='y = sin(x)') ax.plot(x, y2, linestyle='-', color='#e46409', label='y = cos(x)') # x axis plt.xlim([-np.pi, np.pi]) ax.set_xticks([-np.pi, -np.pi/2, 0, np.pi/2, np.pi]) ax.set_xticklabels(['-pi', '-pi/2', '0', 'pi/2', 'pi']) ax.set_xlabel('x') # y axis plt.ylim([-1.2, 1.2]) ax.set_yticks([-1, -0.5, 0, 0.5, 1]) ax.set_ylabel('y') # legend and title ax.legend(loc='best') ax.set_title('Plot of sine and cosine') # save as png plt.savefig('test.png') bash-4.4$ python3 matplotlib_test.py
-
reporter - changed status to resolved
- Log in to comment