Re: open sentinel-2image python
On Sun, 17 Jan 2021 18:01:26 +, MRAB wrote: > On 2021-01-17 13:57, Karsten Hilbert wrote: >> Am Sun, Jan 17, 2021 at 02:20:24AM -0800 schrieb omid mohammadi: >> >>> When I open the sentinel-2 image in Python, I get the following error: >>> >>> MemoryError: Unable to allocate 115. MiB for an array with shape >>> (5490, 5490) and data type float32 >>> >>> How can I fix it? >> >> You can install more RAM. >> > Or maybe the OP is running 32-bit Python but the code needs >2GB. If > that's the case then using 64-bit Python might fix it, assuming that > it's a 64-bit machine. Or there may be an OS limitation on the size of the address space. I would check the OS log first, then do "ulimit -a". If there are sar or vmstat on the system, I would definitely use them. Running out of memory is an OS error and should be checked on the OS level. -- Mladen Gogala Database Consultant http://mgogala.byethost5.com -- https://mail.python.org/mailman/listinfo/python-list
Re: open sentinel-2image python
On 2021-01-17 19:12, omid mohammadi wrote: On Sunday, January 17, 2021 at 9:31:58 PM UTC+3:30, MRAB wrote: On 2021-01-17 13:57, Karsten Hilbert wrote: > Am Sun, Jan 17, 2021 at 02:20:24AM -0800 schrieb omid mohammadi: > >> When I open the sentinel-2 image in Python, I get the following error: >> >> MemoryError: Unable to allocate 115. MiB for an array with shape (5490, 5490) and data type float32 >> >> How can I fix it? > > You can install more RAM. > Or maybe the OP is running 32-bit Python but the code needs >2GB. If that's the case then using 64-bit Python might fix it, assuming that it's a 64-bit machine. Yes, it is 64. Excuse me, can you explain how I can fix it? Are you using a 32-bit version of Python or a 64-bit version of Python? If you're not sure, try this from Python: >>> import sys >>> sys.maxsize.bit_length() I get 63 because I'm running a 64-bit version of Python 3. On Windows you can install multiple versions of Python side-by-side. I don't know the procedure for Linux or MacOS. If you're currently using 32-bit Python, you can install the 64-bit version in a folder next to the folder of the 32-bit version (I have C:\Python39 and C:\Python39-32, for example). Then install any other packages you need for the new version. -- https://mail.python.org/mailman/listinfo/python-list
Re: open sentinel-2image python
On 18/01/2021 08.12, omid mohammadi wrote: > On Sunday, January 17, 2021 at 9:31:58 PM UTC+3:30, MRAB wrote: >> On 2021-01-17 13:57, Karsten Hilbert wrote: >>> Am Sun, Jan 17, 2021 at 02:20:24AM -0800 schrieb omid mohammadi: >>> When I open the sentinel-2 image in Python, I get the following error: MemoryError: Unable to allocate 115. MiB for an array with shape (5490, 5490) and data type float32 How can I fix it? >>> >>> You can install more RAM. >>> >> Or maybe the OP is running 32-bit Python but the code needs >2GB. If >> that's the case then using 64-bit Python might fix it, assuming that >> it's a 64-bit machine. > > Yes, it is 64. > > Excuse me, can you explain how I can fix it? What is "64" - the machine or the Python package? >From where did you download Python? What is the code being used to read/load the image? What do you mean by "the sentinel-2 image" - most of the images (which I spotted in a *quick* survey) made available to the general public are of the order of tens of mega-bytes. (a URL might help people trying to replicate the problem!) Be advised that everyone 'here' is a volunteer. Please help us to help you! -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list
Re: open sentinel-2image python
On Sunday, January 17, 2021 at 9:31:58 PM UTC+3:30, MRAB wrote: > On 2021-01-17 13:57, Karsten Hilbert wrote: > > Am Sun, Jan 17, 2021 at 02:20:24AM -0800 schrieb omid mohammadi: > > > >> When I open the sentinel-2 image in Python, I get the following error: > >> > >> MemoryError: Unable to allocate 115. MiB for an array with shape (5490, > >> 5490) and data type float32 > >> > >> How can I fix it? > > > > You can install more RAM. > > > Or maybe the OP is running 32-bit Python but the code needs >2GB. If > that's the case then using 64-bit Python might fix it, assuming that > it's a 64-bit machine. Yes, it is 64. Excuse me, can you explain how I can fix it? -- https://mail.python.org/mailman/listinfo/python-list
Re: open sentinel-2image python
On 2021-01-17 13:57, Karsten Hilbert wrote: Am Sun, Jan 17, 2021 at 02:20:24AM -0800 schrieb omid mohammadi: When I open the sentinel-2 image in Python, I get the following error: MemoryError: Unable to allocate 115. MiB for an array with shape (5490, 5490) and data type float32 How can I fix it? You can install more RAM. Or maybe the OP is running 32-bit Python but the code needs >2GB. If that's the case then using 64-bit Python might fix it, assuming that it's a 64-bit machine. -- https://mail.python.org/mailman/listinfo/python-list
Re: open sentinel-2image python
Am Sun, Jan 17, 2021 at 02:20:24AM -0800 schrieb omid mohammadi: > When I open the sentinel-2 image in Python, I get the following error: > > MemoryError: Unable to allocate 115. MiB for an array with shape (5490, 5490) > and data type float32 > > How can I fix it? You can install more RAM. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list
open sentinel-2image python
Dear all , When I open the sentinel-2 image in Python, I get the following error: MemoryError: Unable to allocate 115. MiB for an array with shape (5490, 5490) and data type float32 How can I fix it? Thanks -- https://mail.python.org/mailman/listinfo/python-list