Closed beaufort2015 closed 10 months ago
Lastly, it appears you no longer add the issuer= string to the credentials... why not? I added "&issuer=Charles%20Schwab" to the string to get a recognizable icon on the Authy app and it worked.
See #53 and my attempt to fix it in https://github.com/dlenski/python-vipaccess/commit/acf264e20d90b73bd9b3bec330ccbbc958dc4420
If Authy now needs a different hand-holding treatment than it did 3 years ago, please continue the discussion there.
python-vipaccess installed with --user option
:raised_eyebrow: Are you sure you installed it correctly the first time around?
I am extremely skeptical, because the rest of your error messages show that Python is not attempting to use any user-installed pycryptodome
, but instead is attempting to use a systemwide installation of the Crypto
module, built for the wrong processor architecture to boot. :raised_eyebrow: :raised_eyebrow:
> OSError: Cannot load native module 'Crypto.Cipher._raw_ecb':
…
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/Crypto
…
(mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), Not found '_raw_ecb.so'
Whereas when you show your second attempt to install python-vipaccess in more detail, it does correctly install pycryptodome
as a dependency, just as we need it to.
It appears that something went seriously awry in the initial installation attempt (python-vipaccess
was attempting to import a Crypto
module that was both installed system-wide and for the wrong CPU architecture :dizzy_face:).
A subsequent installation attempt shows everything going fine.
So I don't know what went wrong here, but it doesn't appear to have anything at all to do with python-vipaccess
.
Feel free to reopen if you think I missed something, @beaufort2015.
Hello Dan,
Let's start over.
I just upgraded to Mac OS 14.2.1 Sonoma and I uninstalled all the python packages that were installed with --user option... basically I have a clean python3 installation as shipped by Apple. Below is the set of commands that I issued to illustrate my problems with getting vipaccess to run. My commends are augmented with <<< Comment >>>.
But basically the problem boils down to the fact the version of pycryptodome shipped by Apple does not have the correct native code for running on the Apple M1 chip...
So here we go...
<<< First list all the packages that have been installed with pip install --user option.... There are none. >>>
:/Users/beaufort2015/Library/Python/3.10/lib/python/site-packages -> ll total 0 drwxr-xr-x 2 beaufort2015 staff 64 Jan 16 12:23 . drwxr-xr-x 4 beaufort2015 staff 128 Jan 15 17:13 ..
<<< next list all the packages install by Apple for Python 3.10, you can see many of the prerequisite packages installed >>>
:/Users/beaufort2015/Library/Python/3.10/lib/python/site-packages -> pip list Package Version
astroid 2.12.12 autopep8 2.0.0 cachetools 5.2.0 certifi 2022.9.24 charset-normalizer 2.1.1 dill 0.3.6 distlib 0.3.6 filelock 3.8.0 google-api-core 2.10.2 google-api-python-client 2.65.0 google-auth 2.14.0 google-auth-httplib2 0.1.0 google-auth-oauthlib 0.7.0 googleapis-common-protos 1.56.4 httplib2 0.21.0 idna 3.4 isort 5.10.1 lazy-object-proxy 1.8.0 mccabe 0.7.0 numpy 1.23.4 oauthlib 3.2.2 pbr 5.10.0 pep8 1.7.1 pip 22.3 platformdirs 2.5.2 protobuf 4.21.9 pyasn1 0.4.8 pyasn1-modules 0.2.8 pycodestyle 2.9.1 pycryptodome 3.15.0 pylint 2.15.5 pyparsing 3.0.9 requests 2.28.1 requests-oauthlib 1.3.1 rsa 4.9 setuptools 63.2.0 six 1.16.0 stevedore 4.0.0 tomli 2.0.1 tomlkit 0.11.6 uritemplate 4.1.1 urllib3 1.26.12 virtualenv 20.16.5 virtualenv-clone 0.5.7 virtualenvwrapper 4.8.4 wheel 0.37.1 wrapt 1.14.1 z3-solver 4.11.2.0 zxcvbn 4.4.28
[notice] A new release of pip available: 22.3 -> 23.3.2 [notice] To update, run: python3 -m pip install --upgrade pip
<<< Now install python-vipaccess with --user option :/Users/beaufort2015/Library/Python/3.10/lib/python/site-packages -> pip install python-vipaccess --no-cache-dir --verbose --user Using pip 22.3 from /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pip (python 3.10) Collecting python-vipaccess Downloading python_vipaccess-0.14.1-py3-none-any.whl (18 kB) Requirement already satisfied: requests in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from python-vipaccess) (2.28.1) Requirement already satisfied: pycryptodome>=3.6.6 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from python-vipaccess) (3.15.0) Collecting oath>=1.4.1 Downloading oath-1.4.4-py3-none-any.whl (13 kB) Requirement already satisfied: idna<4,>=2.5 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->python-vipaccess) (3.4) Requirement already satisfied: charset-normalizer<3,>=2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->python-vipaccess) (2.1.1) Requirement already satisfied: certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->python-vipaccess) (2022.9.24) Requirement already satisfied: urllib3<1.27,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests->python-vipaccess) (1.26.12) Installing collected packages: oath, python-vipaccess Creating /Users/beaufort2015/Library/Python/3.10/bin changing mode of /Users/beaufort2015/Library/Python/3.10/bin/vipaccess to 755 Successfully installed oath-1.4.4 python-vipaccess-0.14.1
[notice] A new release of pip available: 22.3 -> 23.3.2 [notice] To update, run: python3 -m pip install --upgrade pip
<<< Now look and see what actually got installed >>>
:/Users/beaufort2015/Library/Python/3.10/lib/python/site-packages -> ll total 0 drwxr-xr-x 6 beaufort2015 staff 192 Jan 16 12:26 . drwxr-xr-x 4 beaufort2015 staff 128 Jan 15 17:13 .. drwxr-xr-x 9 beaufort2015 staff 288 Jan 16 12:26 oath drwxr-xr-x 8 beaufort2015 staff 256 Jan 16 12:26 oath-1.4.4.dist-info drwxr-xr-x 10 beaufort2015 staff 320 Jan 16 12:26 python_vipaccess-0.14.1.dist-info drwxr-xr-x 8 beaufort2015 staff 256 Jan 16 12:26 vipaccess
<<< Now invoke vipaccess and it fails because of the missing native code
:/Users/beaufort2015/Library/Python/3.10/lib/python/site-packages -> vipaccess provision -p -t VSMT Traceback (most recent call last): File "/Users/beaufort2015/Library/Python/3.10/bin/vipaccess", line 5, in
python-vipaccess installed with --user option
Invoking
vipaccess provision
fails with:It appears python as shipped by Apple does not have the correct native code... I spent a lot of time researching issues with pycryptodome and M1 chips.. Finally installed pycryptodome with this command:
Since the install seemed to work, I then reinstalled python-vipaccess..
Invoke vipaccess...
Voila! back in the game. Maybe in the future Apple will update its installed version of python and this won't be necessary. Until then, there is a work around.
Lastly, it appears you no longer add the issuer= string to the credentials... why not? I added "&issuer=Charles%20Schwab" to the string to get a recognizable icon on the Authy app and it worked.