ImportError: ..._STPyV8.cpython-38-x86_64-linux-gnu.so
FrecciaTricolore opened this issue · 2 comments
Hi, I have a problem. I followed the installation guide. I installed "Boost" and STPyV8 (I used the "install-ubuntu.sh" script).
I installed Thug with "pip install thug". When I run any command (thug -h, thug --list-ua, thug http: // webpage), it gives me this error:
File "/home/something/.local/lib/python3.8/site-packages/thug/DOM/JSEngine.py", line 24, in
import STPyV8 as V8
File "/usr/local/lib/python3.8/dist-packages/STPyV8.py", line 10, in
import _STPyV8
ImportError: /usr/local/lib/python3.8/dist-packages/_STPyV8.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZN5boost6python15instance_holder8allocateEP7_objectmmm
This error throws a second exception:
Traceback (most recent call last):
File "/home/something/.local/bin/thug", line 5, in
from thug.thug import main
File "/home/something/.local/lib/python3.8/site-packages/thug/thug.py", line 24, in
from .ThugAPI import ThugAPI
File "/home/something/.local/lib/python3.8/site-packages/thug/ThugAPI/init.py", line 1, in
from .ThugAPI import ThugAPI
File "/home/something/.local/lib/python3.8/site-packages/thug/ThugAPI/ThugAPI.py", line 46, in
from thug.DOM.JSEngine import JSEngine
File "/home/something/.local/lib/python3.8/site-packages/thug/DOM/JSEngine.py", line 26, in
import PyV8 as V8
ModuleNotFoundError: No module named 'PyV8'
Ubuntu 20.04
Python 3.8.10
Gcc 9.3.0
Can you help me?
FYI I have created some Python wheels to avoid building STPyV8 from scratch. Ubuntu 20.04/Python 3.8 is a platform I support so I strongly suggest to download the related wheel from https://github.com/area1/stpyv8/releases and install it using pip (simply run pip install --upgrade <wheel_file>). Be aware you still need to install Boost. Please let me know if that solves the issue
Yes, it solves the issue.
Thank you very much.