Reputation: 404
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:
And even after this I still can't use this module in my Python project. How can I make this work?
Upvotes: 3
Views: 3429
Reputation: 404
C:\Users\MichałBogusz>echo %PATH%
C:\ProgramData\Anaconda3;C:\ProgramData\Anaconda3\Library\mingw-w64\bin;C:\ProgramData\Anaconda3\Library\usr\bin;C:\ProgramData\Anaconda3\Library\bin;C:\ProgramData\Anaconda3\Scripts;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\MATLAB\R2019b\bin;C:\Users\MichałBogusz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Scripts;C:\Users\MichałBogusz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Scripts
C:\Users\MichałBogusz>where crypto
INFO: Could not find files for the given pattern(s).
C:\Users\MichałBogusz>dir C:\Users\MichałBogusz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Scripts
Volume in drive C has no label.
Volume Serial Number is DA0C-C2E7
Directory of C:\Users\MichałBogusz\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Scripts
10.10.2019 19:55 <DIR> .
10.10.2019 19:55 <DIR> ..
10.10.2019 12:50 103 361 chardetect.exe
07.10.2019 19:36 103 353 jsonschema.exe
07.10.2019 19:36 103 363 jupyter-kernel.exe
07.10.2019 19:36 103 401 jupyter-kernelspec.exe
07.10.2019 19:36 103 359 jupyter-migrate.exe
07.10.2019 19:38 103 361 jupyter-nbconvert.exe
07.10.2019 19:36 103 380 jupyter-run.exe
07.10.2019 19:36 103 364 jupyter-troubleshoot.exe
07.10.2019 19:36 103 392 jupyter-trust.exe
07.10.2019 19:36 103 359 jupyter.exe
10.10.2019 12:50 103 348 naked.exe
07.10.2019 19:37 103 355 pygmentize.exe
07.10.2019 19:36 24 815 pywin32_postinstall.py
07.10.2019 19:36 3 335 pywin32_testall.py
07.10.2019 19:36 <DIR> __pycache__
14 File(s) 1 268 546 bytes
3 Dir(s) 324 672 733 184 bytes free
So this is what i get
Upvotes: 0
Reputation: 5630
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
Upvotes: 1
Reputation: 2165
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__)
Upvotes: 2