pip list shows installed module but still getting import error

user1462617

I am working with python flask's requests module. I have installed requests module using :

pip install requests

And verified that requests module exists when I run :

pip list

But when I run my python application , I receive import Error for requests module.

I noticed that pip is installing the module in C:\Users\xx\Documents\Projects\Python\Python3REST\lib\site-packages\ folder BUT the interpreter is looking for the module in C:\Users\xx\Documents\Projects\Python\Python3REST\lib\site-packages\flask\ folder.

I have tried running the command :

pip install --install-option="Path to install in" requests

But threw some other error.

The import error I am getting states :

ImportError: cannot import name 'requests' from 'flask' (C:\Users\xx\Documents\Projects\Python\Python3REST\lib\site-packages\flask\__init__.py)

I am working in virtualenv in Windows 10.

I appreciate any help I can get.

Thank you

Derek Eden

what if you add that folder to your path? using sys.path.extend?

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Pip list shows package is installed but import package throws ImportError

Getting a import module not found error even though it is there when I do pip3 list?

Installed Keras with pip3, but getting the "No Module Named keras" error

Cannot import pip installed module that is in path

Geohash Module installed but import error

Still getting the error "No such module 'SwiftyDropbox'"

Rsync installed but still getting an error command not found

Getting import error saying there is no module

Pip Error "Import Error: No Module Named Site"

Getting flask fail to import error for flask-mysqldb when the module is already installed

Installed a third party python module - still won't import (windows)

Trying to import a python module that is installed receiving error

Import from local relative path instead of pip installed module?

How to import custom module the same way as pip-installed modules?

Can't import module installed with pip (anaconda python)

Module installed according to pip freeze but unable to import in virtual environment

Module not found error even though I have pip installed the module

Python : Unable to import TA-lib while it shows in the pip list

Immutable installed but still shows not defined

Tensorflow not getting installed with pip

I've installed Gecko driver but still getting an error

I am working on a discord bot using Python. Everytime I run the program, error shows up "discord module not found." I installed discord.py using pip

Cannot import a package installed with pip

Import error no module named zlib (brew installed python)

Import Error: No module called magic yet python-magic is installed

Pygame is installed yet i there is a 'Import Error: No module named 'pygame'

Externals defined in webpack.config still getting error module not found

'snap list' shows 3 installed packages, can I still purge snapd on Ubuntu 20.04 LTS?

getting error ModuleNotFoundError: No module named 'mysql' when i have installed it