Linked Questions

0 votes
0 answers
139 views

the project structure is as follows: src package1 a.py c.py i can import c from a.py, but why there is ImportError: No module named c, when i try to run a.py? btw, i am using pydev ...
hugemeow's user avatar
  • 8,063
1160 votes
33 answers
1.7m views

I am running Python 2.5. This is my folder tree: ptdraft/ nib.py simulations/ life/ life.py (I also have __init__.py in each folder, omitted here for readability) How do I import the ...
23 votes
5 answers
8k views

I wasn't clear how to correctly name this question. Case 1 Assume that I have the following directory structure. foo | +- bar/__init__.py | +- bar.py If I have from foo import bar How do I know ...
1 vote
4 answers
11k views

I'm on Windows 10 and I am using PyCharm to run my application. I'm pretty new to Python and just coding in general. I typed: pip install flask in the cmd prompt but forgot to open cmd prompt under ...
3 votes
2 answers
4k views

I have two python files - my_python_A.py and my_python_B.py. The first file references the second (from my_python_B import *). I'm executing the first python file from a shell action in Oozie (i.e. ...
John's user avatar
  • 1,167
2 votes
1 answer
9k views

I am trying to write unit test case to test the following method by mocking the database. How to mock the database connection without actually connecting to the real database server.I tried with ...
2 votes
2 answers
10k views

I have a problem similar to that described here How to fix "ImportError: No module named ..." error in Python? but I cannot fix it with the suggestion to set PYTHONPATH. my directory looks ...
Ziqi's user avatar
  • 2,580
2 votes
0 answers
4k views

For five days or so I could start a script with numpy without problems. I installed it like here in the forum proposed and it worked. when I try to start another python script with numpy today, I got ...
0 votes
1 answer
2k views

I have a basic game up and running and I am part way through writing the code for the main menu section for the game which is launched to welcome the user. I was wondering if it would be possible to ...
Oscar's user avatar
  • 107
0 votes
2 answers
2k views

Similar to this question, I have problems importing my own modules and get an ImportError: No module named .... For example, I have a module at myfolder/mymodule.py that I try to load with from ...
1 vote
2 answers
2k views

I am a beginner in Machine Learning. I am getting this error in my machine learning recommendation model "No Module name matrix_factorization_utilities" foundScreen Shot of error. I am using Python 3 ...
1 vote
1 answer
2k views

I just finished by basic learning of Python and I was trying to build something of my own. I am making use of PyGithub and this is my source code, picked from here: #!/usr/bin/python import ...
InsaneCoder's user avatar
  • 8,378
0 votes
1 answer
711 views

I'm trying to use pyHook to get my image to change when I click on it with the mouse. But when I run my code, I get an error. My Code: from __future__ import print_function from PIL import Image ...
Elijah's user avatar
  • 47
-3 votes
1 answer
493 views

I am moving from a functional approach to a more object oriented approach for building a library of valuation models for (derivative) financial instruments in Python. I keep getting error messages ...
Thdh's user avatar
  • 81
0 votes
1 answer
397 views

So I have a path structure that looks like this: ~/Dropbox/Coding/Python/Chessbotslack/scripts/Flask_interface.py ~/Dropbox/Coding/Python/Chessbotslack/database/spreadsheets.py The first line of the ...

15 30 50 per page
1
2