Top "Python-import" questions

For questions about importing modules in Python

How to reload python module imported using `from module import *`

I saw in this useful Q&A that one can use reload(whatever_module) or, in Python 3, imp.reload(…

python python-import python-module
Python 2.7 not working anymore: cannot import name md5

I installed python 3.6.3 on my server yesterday (ubuntu 14.04), and now I cannot run python 2.7 (in the virtual envs and on …

python python-2.7 md5 python-import
Python opencv Aruco "No module named 'cv2.aruco'"

I am running an Ubuntu virtual machine with, Python 3.6.1, Anaconda 4.4.0 (64-bit). I am trying to run the code on this …

python-3.x opencv python-import aruco
Counter in Collections module Python

I've come across a really weird problem. I'm trying to use Counter function in collections module. However, I keep getting …

collections counter python-import importerror python-2.6
How to reference python package when filename contains a period

I am using django and I have a file named models.admin.py and I want to do the following …

python import module package python-import
python datetime gets object has no attribute today error

I have the following 2 different datetime uses: date=request.GET.get('date','') if date: date = datetime.strptime(date, "%m/%…

python python-import python-datetime
Setup.py: install lxml with Python2.6 on CentOS

I have installed Python 2.6.6 on CentOS 5.4, [@SC-055 lxml-2.3beta1]$ python Python 2.6.6 (r266:84292, Jan 4 2011, 09:49:55) [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2 Type "…

python lxml python-2.6 python-import centos5
Why do Python modules sometimes not import their sub-modules?

I noticed something weird today I would like explained. I wasn't 100% sure how to even phrase this as a question, …

python python-import
Openslide-python import error

I receive the following error when running import openslide from inside python terminal <code>Traceback (most recent call …

python python-2.7 python-import openslide
Python - os.path doesn't exist: AttributeError: 'module' object has no attribute 'path'

Investigating a strange error that I started getting all of a sudden with gdb-python, I reduced it down to this: …

python path python-import corruption built-in