Top "Python-import" questions

For questions about importing modules in Python

ValueError: attempted relative import beyond top-level package

I was playing the the Python's import system in order to understand better how it works, and I encountered another …

python-3.x python-import
Prevent Python from caching the imported modules

While developing a largeish project (split in several files and folders) in Python with IPython, I run into the trouble …

python import ipython python-module python-import
Import a Python module into a Jinja template?

Is it possible to import a Python module into a Jinja template so I can use its functions? For example, …

python jinja2 python-import
ImportError: No module named mpl_toolkits with maptlotlib 1.3.0 and py2exe

I can't figure out how to be able to package this via py2exe now: I am running the command: …

python matplotlib py2exe python-import
Force python to use an older version of module (than what I have installed now)

My employer has a dedicated module1 we use for internal unit / system test; however, the author of this module no …

python linux twisted python-import
Should wildcard import be avoided?

I'm using PyQt and am running into this issue. If my import statements are: from PyQt4.QtCore import * from PyQt4.…

python pyqt pyqt4 pylint python-import
Python error: the following arguments are required

I have the Python script that works well when executing it via command line. What I'm trying to do is …

python python-import argparse args
Checking version of OpenCV (cv)

I was checking the version of OpenCV installed previously in a system. I tried to check using from cv2 import __…

python opencv python-import importerror
Import order coding standard

PEP8 suggests that: Imports should be grouped in the following order: standard library imports related third party imports local application/…

python python-import static-analysis pep8
How to create modules in Jupyter notebook and import them? Python

I've created multiple python modules as .py files in a Python IDE called Pyzo in the following path: 'C:\Users\…

python module jupyter-notebook python-import pyzo