My script is producing the following:
"C:\Users\bevod\IdeaProjects\Python MasterClass Scripts\DirLock\Scripts\python.exe" C:\Users\bevod\IdeaProjects\DirLock\DirLock.py
Traceback (most recent call last):
File "C:\Users\bevod\IdeaProjects\DirLock\DirLock.py", line 2, in <module>
import cryptography
ModuleNotFoundError: No module named 'cryptography'
when I run ‘pip show cryptography’ I see this:
Location:
C:\users\bevod\appdata\local\programs\python\python37\lib\site-packages
When I run
C:\Windows\System32> python -c "import sys; print(sys.path)"
I see many things in the path including this:
'C:\\Users\\bevod\\AppData\\Local\\Programs\\Python\\Python37\\lib\\site-packages'
And among other packages, specific to what I am doing, I see these in my pip list
C:\Windows\System32>pip list
Package Version
---------------------------- ----------
cryptography 41.0.7
pip 23.3.1
tk 0.1.0
Outside of this error, I am also expecting another error as I have tried to install TKinter and get this:
C:\Windows\System32>pip install tkinter
ERROR: Could not find a version that satisfies the requirement tkinter (from versions: none)
ERROR: No matching distribution found for tkinter
Here is the detail on the cryptography:
C:\Windows\System32>pip show cryptography
Name: cryptography
Version: 41.0.7
Summary: cryptography is a package which provides cryptographic recipes and primitives to Python developers.
Home-page:
Author:
Author-email: The Python Cryptographic Authority and individual contributors <[email protected]>
License: Apache-2.0 OR BSD-3-Clause
Location: c:\users\bevod\appdata\local\programs\python\python37\lib\site-packages
Requires: cffi
Required-by:
Thanks in advance.
Tried installing cryptography using pip and pip3
Installed ActiveTcl 8.6
Additional info:
Windows 11 Pro 22H2 22621.2792
Python version is: C:\Windows\System32>python -V
Python 3.7.0
C:\Windows\System32>pip –version
pip 23.3.1
ActiveTcl 8.6
You made no effort at all to improve the formatting of your question.
Check whether your IDE uses virtual environment or not and make sure that same python is used. Note also that
tkinter
cannot be installed bypip
. You need to select it when installing python.