Top "Import" questions

The general process of moving data from an external source into one's platform, program, or data set.

Python: Importing urllib.quote

I would like to use urllib.quote(). But python (python3) is not finding the module. Suppose, I have this line …

python python-3.x import urllib
pytest cannot import module while python can

I am working on a package in Python. I use virtualenv. I set the path to the root of the …

python import pytest
How to import a module in Python with importlib.import_module

I'm trying to use importlib.import_module in Python 2.7.2 and run into the strange error. Consider the following dir structure: …

python import module python-importlib
Why does this AttributeError in python occur?

There is one thing, that I do not understand. Why does this import scipy # happens with several other modules, too. …

python import attributeerror
importing go files in same folder

I am having difficulty in importing a local go file into another go file. My project structure is like something …

import path go
Python circular importing?

So i'm getting this error Traceback (most recent call last): File "/Users/alex/dev/runswift/utils/sim2014/simulator.py", line 3, …

python import circular-dependency
Import python module NOT on path

I have a module foo, containing util.py and bar.py. I want to import it in IDLE or python …

python import external python-module
import input_data MNIST tensorflow not working

TensorFlow MNIST example not running with fully_connected_feed.py I checked this out and realized that input_data was …

python import machine-learning tensorflow mnist
How to import module when module name has a '-' dash or hyphen in it?

I want to import foo-bar.py. This works: foobar = __import__("foo-bar") This does not: from "foo-bar" import * My question: Is …

python import module hyphen
Alternative to execfile in Python 3?

Python 2 had the builtin function execfile, which was removed in Python 3.0. This question discusses alternatives for Python 3.0, but some considerable …

python python-3.x import execfile