pyinvoke / invoke

Pythonic task management & command execution.
http://pyinvoke.org
BSD 2-Clause "Simplified" License
4.41k stars 369 forks source link

after an upgrade to ubuntu 23.04 (python 3.11), invoke can no longer import external modules #938

Open rjfred opened 1 year ago

rjfred commented 1 year ago

I ran into a situation where I had to upgrade invoke to the latest version to get it to run at all, then it choked importing an ansible module. I tried importing the same module at the python repl, and it imported fine. The invoke error was simply that "ansible" is not a package.

Ansible is loaded from a submodule, so it's able to import project modules, but it's having trouble with external modules.

kuwv commented 1 year ago

@rjfred can you confirm the versions you are having issues?

rjfred commented 1 year ago

I'm sorry, I can't...it was painful enough that I reinstalled to 22.04. There wasn't much to it though. Using standard ubuntu 23.04 with virtualenv and virtualenvwrapper. The python version was 3.11. I tried projects that were around for the upgrade, but also tried creating a fresh project. Under no circumstances was I able to get any recent version of invoke to import any module that was installed in the virtualenv environment. I didn't try importing from modules that were installed via apt. I was able to import any module within my own project.

On Wed, May 31, 2023 at 11:32 PM Jesse P. Johnson @.***> wrote:

@rjfred https://github.com/rjfred can you confirm the versions you are having issues?

— Reply to this email directly, view it on GitHub https://github.com/pyinvoke/invoke/issues/938#issuecomment-1571276667, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT3RJPUI7Y2LKUS3W7VISK3XJAELBANCNFSM6AAAAAAXTRGZ2Q . You are receiving this because you were mentioned.Message ID: @.***>

-- [image: Rejoiner] http://www.rejoiner.com/ Fred McDavid Senior EngineerRejoiner, Inc. http://www.rejoiner.com/ 26 Washington Square, Suite 7, Newport, RI. USA 02840 Direct: 800.284.4603 <+18002844603>

This electronic mail transmission and any accompanying attachments contain confidential information intended only for the use of the individual or entity named above. Any dissemination, distribution, copying or action taken in reliance on the contents of this communication by anyone other than the intended recipient is strictly prohibited. If you have received this communication in error please immediately delete the e-mail and notify the sender.