简体   繁体   中英

why doesn't it recognize the command and can't open the file when installing modules and packages with pip?

ON WINDOWS, when trying to install packages or modules for Python 3.7. Eg.

When using the "pip install beautifulsoup4" command on cmd it just says:

""pip" isn't recognized as an internal or external command, program or executable batch file."

or

pyhton.exe: can't open file 'pip': [Errno 2] no such file or directory

I use jupyter notebook and when ive been able to run any instalation instead of showing the complete and correct instalation always shows Warning messages saying about it working with TLS or SSL but the SSL is not installed or somethign like so.

I'm checking if the moduls are getting installed with a little code

try:
    import numpy
except ImportError:
    print("Module not installed")

aparently numpy it does is installed but others are not getting installed

When using the "try" code i hope not to get the message and be able to use the modules.

You probably didn't add Python to your Windows Path.

Here it is well explained how it works: ( https://geek-university.com/python/add-python-to-the-windows-path/ ):)

Yes. Even though python installed on Windows, it may be not pointing python path correctly.

Please ensure there is path for python in System environment.

Start -> type system environment -> Edit system environment -> System variables -> Path -> Please make sure you have path added for python -> Ok(Save).

And restart command prompt and run it again.

in command prompt,

py --version

or
python3 --version This should be tell you the version of python

Also

pip --version

This should be work too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM