TypeError: 'module' object is not callable error running pip install selenium

后端 未结 2 513
旧时难觅i
旧时难觅i 2021-01-29 05:04

I have a fresh installation for Python on my PC. To reproduce the issue, I open the command prompt and executed the command:

pip install selenium
相关标签:
2条回答
  • 2021-01-29 05:49

    This error message...

    TypeError: 'module' object is not callable
    

    ...implies that the program was unable to locate pip.exe with in your system.

    From the image it is pretty clear that Python is installed in D: drive while you were trying to access it from C: drive.

    Factually, it doesn't matters where ever you install Python within your system as long as you know where it is at and preferably the path is in your system path. You can use the following command to locate the site packages e.g. pip install

    import site
    print(site.getsitepackages())
    

    However, to keep things simple you need to install Python in it's default location and add the path to the system path. Then you can easily run:

    pip install selenium
    
    0 讨论(0)
  • 2021-01-29 05:51

    this fiexed it:

    python -m pip install selenium --user

    0 讨论(0)
提交回复
热议问题