#πŸ”’ ModuleNotFoundError: No module named 'flask_openapi3' despite being installed

29 messages Β· Page 1 of 1 (latest)

neat socket
#

Hello, I'm trying to run a python project on a linux machine and I am unable to get the dependencies to work correctly, it is specifically complaining about flask_openapi3 even though it is seemingly installed.

Trying to run the python file gives the error (first attachment), and as you can see in (second attatchment) the package is seemingly already installed? I am not sure what I am doing wrong here?

Any help is appriciated ❀️

daring shuttleBOT
#

@neat socket

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

sour rock
#

you have two (or more) installations of python.

#

You have installed the package in one, and are now trying to use it from another

#

you need to figure out which one you installed it into, and which one you're trying to use it from

#

"virtual environments" count as "installations" here.

neat socket
#

any idea how I would go about figuring that out?

#

is the problem that I have a python3 and python3.11 installation?

#

When i use pip instead of pipx i get this error, is that related?

#

I can't seem to find any virtual enviornments, and I haven't purposefully created any

#

I created a virtual env in the project and redid the installation, that seems to work!

sour rock
#
  • what exactly did you type when you installed the package
  • what exactly did you type (or click on) when you tried to run your program, and it failed with that "module not found"
neat socket
#

I went through each of the requiements with either pipx install <package> or sudo apt install pythone3-<package> when pipx failed

sour rock
#

ok so I'll guess that python3 and pipx use different installations of python

#

type type -a python3 and post the output (as text, please, not a screenshot)

#

I wonder if pipx is the wrong tool to install flask-openapi3 -- in my experience, pipx is only for command-line executables, whereas flask-openapi3 appears to be a framework like flask or django

#

the "error" from "pip install" isn't really an error, it's an understandble -- but annoying -- choice that Debian made about how pip works on debian systems

#

let's take a step back. What problem are you trying to solve?

#

Perhaps you want to build a web site that uses flask-openapi3 and you're setting stuff up ?

neat socket
#

it seems to work now after creating a specific virtual env for the project

sour rock
#

I recommend that you sudo apt install python3-venv, then create a virtual environment, install flask-openapi3 into that, and do you work "in" it

#

ah jinx

neat socket
#

haha yeah thats what I did ^^

sour rock
#

x l n t

neat socket
#

thank you though

#

!close

daring shuttleBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.