Top "Python-import" questions

For questions about importing modules in Python

List all the modules that are part of a python package?

Is there a straightforward way to find all the modules that are part of a python package? I've found this …

python module packages introspection python-import
Can you define aliases for imported modules in Python?

In Python, is it possible to define an alias for an imported module? For instance: import a_ridiculously_long_module_…

python module alias python-import
ImportError: No module named google.cloud

I am unable to import google.cloud.speech from google.cloud import speech I have installed it using : pip install …

python-2.7 python-import google-speech-api google-cloud-speech
How to use OpenCV in Python?

I have just installed OpenCV on my Windows 7 machine. As a result, I get a new directory: C:\OpenCV2.2\Python2.7\…

python opencv importerror python-import
How to check if a python module has been imported?

How do I check if I imported a module somewhere in the code? if not has_imported("somemodule"): print('you …

python python-import
Circular import dependency in Python

Let's say I have the following directory structure: a\ __init__.py b\ __init__.py c\ __init__.py c_file.py …

python dependencies circular-dependency python-import
No module named pandas_datareader

I have just installed pandas_datareader using pip install pandas-datareader which ran successfully. Now I am trying to use it …

python-3.x module python-import spyder pandas-datareader
What exactly does "import *" import?

In Python, what exactly does import * import? Does it import __init__.py found in the containing folder? For example, is …

python namespaces python-import
How to solve import error for pandas?

I installed Anaconda with python 2.7.7. However, whenever I run "import pandas" I get the error: "ImportError: C extension: y not …

python python-2.7 pandas pydev python-import
Module Not found during import in Jupyter Notebook

I have the following package (and working directory): WorkingDirectory-- |--MyPackage-- | |--__init__.py | |--module1.py | |--module2.py | |--notebook.ipynb In __…

python python-3.x jupyter-notebook python-import python-module