Search code examples
pythonselenium-webdriverseleniumwire

Issue while installing selenium-wire


I wanted to use selenium-wire to intercept requests from Selenium to remote host. I tried to install it using PIP, it installed successfully without any issues, but when I went to import it on my project its giving me error as follows:

no module named 'blinker._saferef

I tried to dig in the issue, but found nothing. I can tell that it is due to the library itself is now discontinued. Can you help me with this issue?

I tried to find the root cause of the error expecting it to solve my issue, but couldn't find anything.


Solution

  • You seem to be facing issue which is not related to the library itself but the dependency of the library. Please uninstall the version of blinker._saferef, issue the command below:

    pip uninstall selenium-wire 
    pip uninstall blinker
    

    once its uninstall use the blinker version which is less than 1.8.0, use following command:

    pip install blinker==1.7.0
    

    Finally install selenium-wire:

    pip install selenium-wire
    

    Try to use the library, it should work.