简体   繁体   中英

Import Not Working and Pip Can't Install Anything

Let the code speak for itself:

    C:\Users\thedi>pip install random

Collecting random Could not find a version that satisfies the requirement random (from versions: ) No matching distribution found for random

    C:\Users\thedi>import random

'import' is not recognized as an internal or external command, operable program or batch file.

ERROR :

Could not find a version that satisfies the requirement random

ERROR :

No matching distribution found for random

if the above one is your error

then follow these steps-

Press

NOTE -

check your python version before installing any module

After installing module copy and paste in your pip folder.

follow this path to paste your module in pip folder.

[C:\Users\Admin\AppData\Local\Programs\Python\Python38-32\Scripts]

HOPE IT HELPS!

You first have to enter the Python console to run Python code. Type "python" and press enter to use the console after you have installed Python.

Also, please note that random is a built-in module, so there's no need to install it using pip, and that also might be why pip couldn't locate that package.

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