I am getting the error zsh: illegal hardware instruction if I try to use the request-html module.
Question posted in Visual Studio Code
View the official documentation.
View the official documentation.
I am getting the error zsh: illegal hardware instruction if I try to use the request-html module.
2
Answers
I solved it by creating a virtual environment on Python. The error disappears if you install your modules including request-html into a virtual environment.
I’ve been working with an Apple M1 since last month, and I have not seen this behavior.
My setup is the following:
I really recommend you use the same setup since it will preserve your python root and also avoid these problems.
So, try the following:
1 – install pyenv
2 – Install python 3.10 or > versions, using pyenv.
3 – Install python venv
4 – create a virtual environment, and install requests
5 – Run your code, using the virtual environment, and check if it solves your problem.