我正在使用mac anaconda.我尝试使用加密的AES.但是,我面临一个奇怪的问题.
我只是想执行一行简单的代码:
obj = AES.new('This is a key123', AES.MODE_CBC, 'This is an IV456')
Run Code Online (Sandbox Code Playgroud)
如果我在没有虚拟环境的情况下运行代码,则可以.
$ python
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 12:04:33)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more
information.
>>> from Crypto.Cipher import AES
>>> obj = AES.new('This is a key123', AES.MODE_CBC, 'This is an IV456')
Run Code Online (Sandbox Code Playgroud)
如果我运行虚拟环境"testaes"然后我得到错误:
(testaes)$ python
Python 3.6.4 |Anaconda, Inc.| (default, Mar 12 2018, 20:05:31)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin …Run Code Online (Sandbox Code Playgroud)