Open tigran123 opened 10 months ago
Post the whole log please.
Here is the full typescript of pkg install matplotlib
pkg i ninja patchelf
Thank you, that worked. But presumably those two packages should be listed as dependencies and installed automatically?
And now pip install gmpy
fails with longinterp.h
header missing...
And now
pip install gmpy
fails withlonginterp.h
header missing...
gmpy 1.17 - release Jul 28, 2013
you can try your luck with 2.1.5 or switch to older python
pip install https://github.com/aleaxit/gmpy/archive/refs/tags/gmpy2-2.1.5.tar.gz
My python programming environment has modules installed with pip in a virtual environment,
and I want to install matplotlib there as well. I was able to install it on Termux with pkg in the way described here,
but in the my activated virtual-env install matplotlib is failure
(env) [1.164s] [~/pyprog]$ pip install matplotlib
I can't install this with a wheel error If you have any ideas or suggestions, I would appreciate it
P.S. and information
Before coming here, I looked at the following topics and entered the command
https://github.com/termux/termux-app/discussions/3444
I don't understand what those commands mean :)
I'd like to post a log of the errors, but I'll upload the whole thing somewhere if necessary
(env) [1.164s][~/pyprog]$ pip install matplotlib
Collecting matplotlib
Using cached matplotlib-3.8.2.tar.gz (35.9 MB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [92 lines of output]
.
.
By installing the same necessary modules as in the virtual environment on the pip on the raw termux environment side, which is not currently a virtual environment,
It can be used as an environment with matplotlib
this is good, but the problem is not solved it
@Suletta-Majo you can copy required modules from
/data/data/com.termux/files/usr/lib/python3.11/site-packages
to lib/python3.11/site-packages
inside your venv
@romanovj
There were two directories, so I moved them with cp matplotlib*
has appeared in pip list in env! :)
In the Python program for the graph image output test
The matplotlib module import error is gone, but I get a new numpy error
errormsg.txt
my testing code mplottes.py
import matplotlib.pyplot as plt
plt.plot([1, 2, 3])
plt.savefig('myfig.png')
On the raw termux side that is not a virtual environment, the graph creation was successful, and I was able to view the image with Chafa
Both are the same numpy version
I wonder if there are still things that aren't installed as dependencies? ☹️
@Suletta-Majo
patchelf --add-needed libpython3.11.so /data/data/com.termux/files/home/pyprog/env/lib/python3.11/site-packages/numpy/core/_multiarray_umath.cpython-311.so
@romanovj thanks I tried it, but there error seems to be no change errormsg2.txt
@Suletta-Majo try to execute inside venv, it will install all missing deps
pip install matplotlib
you can also replace folders with numpy module inside venv with standart termux module
@romanovj
on my virtual-environment
pip install matplotlib
is run completed!
but error is same
Let's run python and modules in a virtual environment on the site I learned because it was recommended and so I just followed it. I would like to move to programming in a direct environment that is easy and simple in terms of Termux😓 I'm not advanced user and As it is happening now, it is not like I can Corrections and countermeasures with it. thanks
@Suletta-Majo did you replace numpy in venv with numpy from /data/data/com.termux/files/usr/lib/python3.11/site-packages ?
@romanovj
Because the machine translation displayed the copy source and destination as if it were reversed.
I didn't do it because I didn't understand the purpose of this work, but I understood it with a new statement and carried
it out Errors are now concise and short, and I feel like they can be solved
somehow Is this a good way to uninstall some duplicate matplotlib?
(env) [165ms][~/pyprog]$ python3 mplottes.py
/data/data/com.termux/files/home/pyprog/env/lib/python3.11/site-packages/matplotlib/projections/init.py:63: UserWarning: Unable to import Axes3D. This may be due to multiple versions of Matplotlib being installed (e.g. as a system package and as a pip package). As a result, the 3D projection is not available.
warnings.warn("Unable to import Axes3D. This may be due to multiple versions of "
additional info below. my termux installed 3way matplotlib :/ not checked pip3 list rawandenvpip.txt
success! thankyou @romanovj
i not copyed all required module
so when copy start. i found mystery module named mpl_toolkit
i copy this to venv module directory then plotprogram completed run and generate png graph successfully!
thx a lot and sorry my wrong action :D
[76ms][/data/data/com.termux/files/usr/lib/python3.11/site-packages]$ cp -rf matplot ~/pyprog/env/lib/python3.11/site-packages
[0.899s][/data/data/com.termux/files/usr/lib/python3.11/site-packages]$ cp -rf pypar ~/pyprog/env/lib/python3.11/site-packages
[154ms][/data/data/com.termux/files/usr/lib/python3.11/site-packages]$ cp -rf count ~/pyprog/env/lib/python3.11/site-packages
cp: cannot stat 'count': No such file or directory
[115ms][1][/data/data/com.termux/files/usr/lib/python3.11/site-packages]$ cp -rf conto ~/pyprog/env/lib/python3.11/site-packages
[135ms][/data/data/com.termux/files/usr/lib/python3.11/site-packages]$ cp -rf cycl ~/pyprog/env/lib/python3.11/site-packages
[96ms][/data/data/com.termux/files/usr/lib/python3.11/site-packages]$ cp -rf kiwi* ~/pyprog/env/lib/python3.11/site-packages
[154ms][/data/data/com.termux/files/usr/lib/python3.11/site-packages]$ cd mpl_toolkits /data/data/com.termux/files/usr/lib/python3.11/site-packages/mpl_toolkits
. mplot3d axis
Problem description
Trying to install matplotlib package fails. First it fails with the missing
spawn.h
header error, but after installing thelibandroid-spawn
package it fails in a different way.What steps will reproduce the bug?
pkg install matplotlib
What is the expected behavior?
it should succeed.
System information
termux-info: