Troubles with Python imports

Roland Mueller roland.em0001 at googlemail.com
Wed Feb 10 06:33:12 EST 2021


ke 10. helmik. 2021 klo 5.07 Terry Reedy (tjreedy at udel.edu) kirjoitti:

> On 2/9/2021 9:55 AM, Philipp Daher via Python-list wrote:
> > Hello,
> >
> > I’ve just typed „pip install selenium“ into my command prompt on windows
> 10. Although my computer told me that the requirement was already
> satisfied, import selenium did not work. So I tried different methods to
> install it and typed „Python“ in my command prompt and imported selenium.
> It worked fine. Then, I typed it into my shell and got an error. Why is it
> working in the command prompt but not in the actual shell?
>
> One common problem (and answer -- monthy on stackoverflow) is that you
> have more than one python binary installed; do not have module xyz
> installed for all of them; and are running different binaries to get the
> different responses.
>
>
> May be the first thing is to check whether one is using the right pip.
Example output is from Linux box, but in Windows the output should also
show the relevant information:
$ pip -V
pip 19.3.1 from /usr/lib/python3.8/site-packages/pip (python 3.8)
$ python -V
Python 3.8.7


>


More information about the Python-list mailing list