I am a beginner, and its been hard to know where to search info about the problem, but I have been all day searching solutions yet I haven’t found anything that would help words I am trying to import: my file In which I am trying to import: the error popping: I am trying to import my file words to
Tag: importerror
Struggling with python’s import mechanism
I am an experienced java enterprise developer but very new to python enterprise development shop. I am currently, struggling to understand why some imports work while others don’t. Some background: Our dev team recently upgraded python from 3.6 to 3.10.5 and following is our package structure Now, inside the moduleA.py, I am trying to import subpackage2/moduleZ.py like so But, I
Import Error: Missing optional dependecy ‘openpyxl.’
I am familiar with using pip to install Python packages but there is no way to install it in the environment I am working in. We have to call the directory with python.exe to run any Python code. Therefore, it is impossible to use pip install because, since there is no python, there is no pip. How could we install
Why is mechanize not installing properly via pip on RPi? (python 3.9)
I can’t get to successfully install the package ‘mechanize’ on a Raspberry Pi (so, ARM chip) with Debian Bullseye, python 3.9 in a virtualenv. When I look in the virtualenv’s sitepackages folder, indeed the mechanize package only has .dist-info file, but not a mechanize.py file or mechanize package folder. See below. Question: Am I overlooking something? Details (1): Installing mechanize
Python Importing package at same level but different directory
python version:3.9.6 I cannot seem to get this to work I know there are a million posts that are the same as this but the solutions never seem to work for me. I’ve run into this before and always end up just restructuring the folders to include all files in one path which is obviously not ideal. So here I
ImportError in test files
I’ve seen a lot of questions that are similar to this but none of the solutions have worked for me. I’m getting an import error when trying to run pytest on a test package I’m developing to teach myself how to create python packages. Currently I have a python package that looks like and my test_module_a.py contains Running the command
“Most likely due to circular import” in Python
Does anyone know why this piece of code returns this error when run and how to fix it? When I run this code in normal IDLE it seems to work but it doesn’t work in Visual Studio Code. Answer It seems like the program file you have created is named threading.py, and you are importing a module also called threading.
Import Error: can’t import name gcd from fractions
I’m trying to import a function called gcd from a module called fractions with from fractions import gcd. For some reason, PyCharm throws an ImportError: I had this working before, what am I doing wrong? Answer Your traceback says Python 3.9 and the documentation says gcd is a function in math Changed in version 3.9: The math.gcd() function is now
ImportError while importing pandas: gettz not built
Suddenly my python file won’t run anymore due to an ImportError. I already tried updating/reinstalling pandas via conda but this didn’t change anything. What could I try to fix this? Answer As suggested by furas, installing the package dateutil fixed the error.
ImportError while importing PySide2
I installed PySide2 using pip install PySide2 But i got this error when i tried to import it: Answer Have a look at the PyPI documentation here. If that doesn’t help try to use Make sure it is installede in your virtual environtment if you are using that and you are using the correct version of pip(3). Here is a