You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the following error when I am trying to install it:
`
ubuntu@ubuntu:~/heap$ sudo pip3 install ./libptmalloc/
Processing ./libptmalloc
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [17 lines of output]
Traceback (most recent call last):
File "/usr/lib/python3.10/tokenize.py", line 344, in find_cookie
codec = lookup(encoding)
LookupError: unknown encoding: future_fstrings
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 28, in <module>
File "/usr/lib/python3.10/tokenize.py", line 396, in open
encoding, lines = detect_encoding(buffer.readline)
File "/usr/lib/python3.10/tokenize.py", line 373, in detect_encoding
encoding = find_cookie(first)
File "/usr/lib/python3.10/tokenize.py", line 352, in find_cookie
raise SyntaxError(msg)
SyntaxError: unknown encoding for '/home/ubuntu/heap/libptmalloc/setup.py': future_fstrings
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
ubuntu@ubuntu:~/heap$ python3 --version
Python 3.10.6
`
Installing or uninstalling future_fstrings package does not seem like affecting the outcome.
I guess it is due to ARM64 as I might have not tried to install it on ARM64. I have just tried to install it on a AMD64 Ubuntu system and it worked fine.
Activity
saidelike commentedon Nov 8, 2022
Hi,
Thanks for your report.
It is weird that it complains about fstrings missing since you use Python 3.10 which should have native support for f-strings.
You could always try to install future_fstrings as detailed in https://github.com/nccgroup/libptmalloc/blob/master/docs/InstallGuide.md#libptmalloc-installation to see if that fixes the problem?
Another idea would be to try the following instead to see if you still have the error?
On a final note, you should be able to use libptmalloc even without installing it as detailed in https://github.com/nccgroup/libptmalloc/blob/master/docs/InstallGuide.md#use-without-installation
AlixAbbasi commentedon Nov 9, 2022
Thank you for the reply. It is indeed weird. I tried to follow your recommendation but I got the same result.
As you see I already have future strings. I tried to then delete it and install it via installation script:
Which unfortunately yield the same result. Here is system info (note ARM 64)
saidelike commentedon Nov 29, 2022
I guess it is due to ARM64 as I might have not tried to install it on ARM64. I have just tried to install it on a AMD64 Ubuntu system and it worked fine.
Can you use libptmalloc without installing it, just by importing it, following https://github.com/nccgroup/libptmalloc/blob/master/docs/InstallGuide.md#use-without-installation ?