louisabraham / ffpass

Import and Export passwords for Firefox Quantum 🔑
MIT License
380 stars 39 forks source link

'ffpass' is a package and cannot be directly executed #59

Closed wickens closed 3 years ago

wickens commented 3 years ago

Hi, I installed Python using this guide. Version 3.9.0.

The ffpass command didn't work right away so after searching around I came across a suggestion to use

python3 -m ffpass

However, when running this I get the following message: /Users/mandi/.pyenv/versions/3.9.0/bin/python3: No module named ffpass.__main__; 'ffpass' is a package and cannot be directly executed

Any suggestions much appreciated.

If it helps: mandi@Hodor ~ % which python3
returns /Users/mandi/.pyenv/shims/python3

Also: mandi@Hodor ~ % pip3 install ffpass Requirement already satisfied: ffpass in ./.local/lib/python3.9/site-packages (0.5.0) Requirement already satisfied: pyasn1 in ./.local/lib/python3.9/site-packages (from ffpass) (0.4.8) Requirement already satisfied: pycryptodome in ./.local/lib/python3.9/site-packages (from ffpass) (3.10.1) WARNING: You are using pip version 20.2.3; however, version 21.0.1 is available. You should consider upgrading via the '/Users/mandi/.pyenv/versions/3.9.0/bin/python3.9 -m pip install --upgrade pip' command.

louisabraham commented 3 years ago

Could you give me output of ls /Users/mandi/.pyenv/versions/3.9.0/bin/python3.9? I think it is probably an issue with pyenv that does not create the shim. Le 20 févr. 2021 à 19:07 +0100, Marc Wickens notifications@github.com, a écrit :

Hi, I installed Python using this guide. Version 3.9.0. The ffpass command didn't work right away so after searching around I came across a suggestion to use python3 -m ffpass However, when running this I get the following message: /Users/mandi/.pyenv/versions/3.9.0/bin/python3: No module named ffpass.main; 'ffpass' is a package and cannot be directly executed Any suggestions much appreciated. If it helps: mandi@Hodor ~ % which python3 returns /Users/mandi/.pyenv/shims/python3 Also: mandi@Hodor ~ % pip3 install ffpass Requirement already satisfied: ffpass in ./.local/lib/python3.9/site-packages (0.5.0) Requirement already satisfied: pyasn1 in ./.local/lib/python3.9/site-packages (from ffpass) (0.4.8) Requirement already satisfied: pycryptodome in ./.local/lib/python3.9/site-packages (from ffpass) (3.10.1) WARNING: You are using pip version 20.2.3; however, version 21.0.1 is available. You should consider upgrading via the '/Users/mandi/.pyenv/versions/3.9.0/bin/python3.9 -m pip install --upgrade pip' command. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

wickens commented 3 years ago

The last part of that path 'python3.9' doesn't appear to be a directory, here is the output of the directory above

ls -hl /Users/mandi/.pyenv/versions/3.9.0/bin

lrwxr-xr-x 1 mandi staff 8B 20 Feb 17:29 2to3 -> 2to3-3.9 -rwxr-xr-x 1 mandi staff 125B 20 Feb 17:29 2to3-3.9 lrwxr-xr-x 1 mandi staff 16B 20 Feb 17:29 easy_install -> easy_install-3.9 -rwxr-xr-x 1 mandi staff 262B 20 Feb 17:29 easy_install-3.9 lrwxr-xr-x 1 mandi staff 7B 20 Feb 17:29 idle -> idle3.9 lrwxr-xr-x 1 mandi staff 7B 20 Feb 17:29 idle3 -> idle3.9 -rwxr-xr-x 1 mandi staff 123B 20 Feb 17:29 idle3.9 lrwxr-xr-x 1 mandi staff 6B 20 Feb 17:29 pip -> pip3.9 -rwxr-xr-x 1 mandi staff 253B 20 Feb 17:29 pip3 -rwxr-xr-x 1 mandi staff 253B 20 Feb 17:29 pip3.9 lrwxr-xr-x 1 mandi staff 8B 20 Feb 17:29 pydoc -> pydoc3.9 lrwxr-xr-x 1 mandi staff 8B 20 Feb 17:29 pydoc3 -> pydoc3.9 -rwxr-xr-x 1 mandi staff 108B 20 Feb 17:29 pydoc3.9 lrwxr-xr-x 1 mandi staff 9B 20 Feb 17:29 python -> python3.9 lrwxr-xr-x 1 mandi staff 16B 20 Feb 17:29 python-config -> python3.9-config lrwxr-xr-x 1 mandi staff 9B 20 Feb 17:29 python3 -> python3.9 lrwxr-xr-x 1 mandi staff 16B 20 Feb 17:29 python3-config -> python3.9-config -rwxr-xr-x 1 mandi staff 3.6M 20 Feb 17:28 python3.9 -rwxr-xr-x 1 mandi staff 2.0K 20 Feb 17:29 python3.9-config -rwxr-xr-x 1 mandi staff 64K 20 Feb 17:29 python3.9-gdb.py

Thanks,

louisabraham commented 3 years ago

I think you should try pyenv rehash

wickens commented 3 years ago

Thanks. I did that, reinstalled via pip and it's working. FYI anyone who installed Firefox to use this script, for the purpose of allowing Safari to import the passwords, you have to save at least one password in Firefox for it to create the password DB. If you don't do that you'll get a 'Firefox database not found message'. Thanks again.