Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing modules with pip doesn't work correctly

Tags:

python

So, I'm trying to install the Crypto package through pip and I get this message error:

WARNING: The scripts crypto.exe and decrypto.exe are installed in 'C:\Users\MichałBogusz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

So I added the path to my PATH variable and this is how it looks like in the window now:

enter image description here

And even after this I still can't use this module in my Python project. How can I make this work?

like image 226
Michał Bogusz Avatar asked Mar 20 '26 07:03

Michał Bogusz


2 Answers

In terms of installing the package, you may just need to restart your console and try again. Sometimes the PATH variable does not refresh for the open console.

If you want to know what is on the PATH for your current console, you can run the command echo %PATH% to check your current path.

If your package has already been installed and you want to check to make sure it has, you can run this to check that it has installed and print out its installation location as well:

import YOUR_MODULE
print(YOUR_MODULE.__file__)
like image 84
Enthus3d Avatar answered Mar 21 '26 21:03

Enthus3d


After changing the path it might be a good idea to restart your PC (or at least to logout and login) to be sure, that the path is taken into account.

If it still doesn't work:

Open then a cmd.exe window and type

echo %PATH%
where crypto
dir C:\Users\MichałBogusz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Scripts

and send us the output

like image 23
gelonida Avatar answered Mar 21 '26 22:03

gelonida



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!