import Questions

5

Solved

I am working with Eclipse Kepler(2013) and python 3.3.2 and running a simple import like import glob a = glob.glob('*') print(a) gives a: TypeError: 'module' object is not callable This is no...
Cervantez asked 6/9, 2013 at 12:0

6

Solved

I am trying to import modules from a list. This would be to allow easier editing of imported modules, cleaner error message, and better error handling. Here is basically what I am trying to do: im...
Morose asked 24/7, 2014 at 17:44

4

Solved

I'm using python2.6 and got a problem this morning. It said 'module' has no attribute 'Image'. Here is my input. Why the first time I can not use PIL.Image? >>> import PIL >>> PI...
Guizot asked 11/8, 2012 at 2:46

2

In my terraform config files I create a Kubernetes cluster on GKE and when created, set up a Kubernetes provider to access said cluster and perform various actions such as setting up namespaces. T...
Stull asked 10/9, 2019 at 7:6

15

It seems there are already quite some questions here about relative import in python 3, but after going through many of them I still didn't find the answer for my issue. so here is the quest...
Alfreda asked 5/6, 2015 at 14:46

3

Solved

I'm using virtualenv to set up a new project. I installed a lot of things using virtualenv pip from the script folder like below: flask\scripts\pip install Flask-WTF I have no other packages ins...
Slab asked 18/8, 2013 at 8:10

3

Solved

I want to dynamically import components without importing a specific component. I want to set the component name with a variable, received from the store: <script lang="ts"> // SVE...
Sonasonant asked 23/9, 2021 at 7:14

3

Solved

I have gone through many Python relative import questions but I can't understand the issue/get it to work. My directory structure is: Driver.py A/ Account.py __init__.py B/ Test.py __...
Bouillon asked 14/2, 2013 at 23:48

2

In my chrome extension (manifest V3) I want to import some scripts like jquery and more. Inside my backgound.js I have: try { importScripts('/js/jquery-3.4.1.min.js', '/js/common.js'); } catch (e)...
Mongeau asked 8/4, 2021 at 8:27

29

Solved

How can you reliably and dynamically load a JavaScript file? This will can be used to implement a module or component that when 'initialized' the component will dynamically load all needed JavaScri...
Stringendo asked 21/8, 2008 at 21:59

2

I used pip install fastapi to download it in my virtual environment, in terminal but when I try to import from it it shows up as a missing import.
Copalite asked 26/4, 2022 at 18:50

27

Solved

I have a very similar question to this question, but I am still one step behind. I have only one version of Python 3 installed on my Windows 7 (sorry) 64-bit system. I installed NumPy followi...
Chiastic asked 19/10, 2011 at 8:54

3

Solved

I have a python script that have __main__ statement and took all values parametric. I want to import and use it in my own script. Actually I can import but don't know how to use it. As you see be...
Conducive asked 21/7, 2014 at 11:4

1

as i know, from torchtext 0.9.0, torchtext.data and torchtext.dataset are moved to torchtext.legacy but my 0.12.0 torchtext can't import torchtext.legacy while it can import torchtext.data I tried...
Origin asked 16/3, 2022 at 7:58

2

Solved

I am trying to put default and named export in same file. Example: // file name : utils/fetch export default fetchUtil; module.exports = { fetch : fetchUtil, post, put, get, }; // import cod...
Kaycekaycee asked 17/10, 2016 at 12:42

3

I'm interested to know if there's a convention that allows a person to test the expected usage of a package from within the package. Consider the following package.json: { "name": "@place/fn", "...
Omphalos asked 12/2, 2020 at 18:28

2

Solved

I need to reimport module integration-test/integration upon every run as this module can have code dynamically changed in it at run time. I am using NodeJS with experimental modules in order to be ...
Oulu asked 7/6, 2019 at 10:32

2

Solved

For the following command %time python test.py on this script, test.py import numpy as np from math import * import matplotlib.pyplot as plt import matplotlib.cm as cm from matplotlib.colors i...
Caravel asked 24/8, 2015 at 2:54

3

Solved

I'm playing around with matplotlib to understand its structure better and I'm confused by the following piece of code: import matplotlib as mpl from mpl import pyplot as plt # ModuleNotFoundError :...
Kenway asked 20/3, 2022 at 19:5

7

Solved

I thought this would be trivial, but it isn't... I'm sure there is a simple way to do it but I can't manage to find it. Shame on me. I want to import/export the database itself, the tables, the co...
Latt asked 14/7, 2009 at 16:32

2

I'm trying to crunch some numbers in: I have tested a few variations of importing data but failed. Really appreciate some advise. Thanks! path = 'Data/Price.numbers' with open(path) as file: file...
Millwork asked 29/12, 2017 at 14:2

7

Solved

I downloaded the StatsModels source from this location. Then untarred to /usr/local/lib/python2.7/dist-packages and per this documentation, did this sudo python setup.py install It installed but ...
Westberg asked 3/8, 2012 at 3:35

3

I'm new to pytest and python. My project structure is : projroot/ |-src/ |-a.py |-test/ |-test_a.py and test_a.py is: from ..src import a def test_a(): pass Then run pytestunder projroot: ...
Actually asked 21/3, 2020 at 15:42

21

Solved

How can I import a database with mysql from terminal? I cannot find the exact syntax.
Revareval asked 28/12, 2010 at 14:31

5

Solved

Is it possible to import a single database from an --all-databases mysqldump? I guess I can modify the file manually but wondering if there are any command line options to do this. I am moving ser...
Yasminyasmine asked 26/2, 2010 at 14:45

© 2022 - 2024 — McMap. All rights reserved.