Questions tagged [importerror]

Refers to errors that result from attempting to import a module or library into one's code

Filter by
Sorted by
Tagged with
-2 votes
0 answers
49 views

Java Program for Finding Prime Numbers in a Given Range: [closed]

I'm working on a Java program to find all prime numbers within a given range. The program should take two integers as input (start and end) and print the prime numbers in that range. Here's what I ...
Mohammad Zishan Mansuri's user avatar
0 votes
0 answers
22 views

Dlib ImportError: DLL load failed while importing _dlib_pybind11: The specified module could not be found

When trying to use dlib this message is showing: import dlib Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\NEERAJ\AppData\Local\...
Jai Sakalle's user avatar
-1 votes
0 answers
23 views

ImportError: cannot import name ‘StratifiedShuffledSplit’ from ‘sklearn.model_selection’ [closed]

I cannot import name ‘StratifiedShuffledSplit’ from ‘sklearn.model_selection’. I’m facing problem with this part of the code on Jupyter Notebook: CODE from sklearn.model_selection import ...
ardra1111 's user avatar
0 votes
0 answers
36 views

Jupyter returning error for no clear reason

I had been doing a ML course where we had to use conda + anaconda. In the course, they start up jupyter through the terminal, which for some reason I couldn't do. So I started using the microsoft ...
John Carter's user avatar
0 votes
1 answer
10 views

ImportError: cannot import name 'search' from 'googlesearch' in python

When I am importing google from googlesearch I am getting the following error. from googlesearch import search (...\AppData\Roaming\Python\Python39\site-packages\googlesearch\__init__.py) ImportError: ...
Arun's user avatar
  • 119
0 votes
0 answers
16 views

Tried all possible solutions for auto import in vscode in next.js (also problem in finding the module even after giving relative path)

In next.js , in src folder , I've created two folder app and components, in app folder there are two files page.tsx and layout.tsx . the page.tsx in the main page where the display is done in ...
benerd 's user avatar
0 votes
0 answers
16 views

ImportError: cannot import name '_api' from 'matplotlib' (unknown location) fix? [closed]

Hi I keep getting this error repeatedly. I am using matplotlib 3.2.2 with jupyter lab. Tried downgrading but didn't work. Also attempted to delete duplicate "matplotlib.py" files but to no ...
Kitt Pras's user avatar
0 votes
0 answers
26 views

Pylint issue in Python 3.11

I am getting import error when running lint I am using pylint version 3.0.2 and python version 3.11 Getting the below error from pylint.interfaces import IAstroidChecker, ITokenChecker ImportError: ...
Gokula Kannan's user avatar
0 votes
1 answer
32 views

ImportError: No module named 'Shapes' when running Python scripts and tests

Description: I'm encountering an ImportError issue in my Python project related to module imports. The project structure is as follows: C:. ├───Shapes │ │ Circle.py │ │ Rectangle.py │ │ ...
Jovan Tatic's user avatar
-2 votes
1 answer
60 views

ImportError: cannot import name 'LlamaIndex' from 'llama_index'

while executing the following line of code in python from llama_index import LlamaIndex I am keep getting ImportError, how to rectify it. Error: ImportError: cannot import name 'LlamaIndex' from '...
Janani M's user avatar
0 votes
0 answers
48 views

Raspberry Pi Pandas/Numpy ImportError: Unable to import required dependencies: import numpy from source directory

I was doing import pandas as pd and immediately got the ImportError. Error message: Traceback (most recent call last): File "/home/projects/.../pm_venv/pd_test.py", line 1, in <module&...
yhc0712's user avatar
-1 votes
0 answers
27 views

error while importing koalas from databricks

import numpy as np 2 import pandas as pd ----> 3 import databricks.koalas as ks File c:\Users\diego\anaconda3\Lib\site-packages\databricks\koalas\__init__.py:74 66 raise RuntimeError( 67 ...
Diego Alonzo's user avatar
-1 votes
0 answers
15 views

MagickWand shared library not found

After running 'alembic revision --autogenerate' (macOS) I receive the error "ImportError: MagickWand shared library not found. You probably had not installed ImageMagick library. Try to install: ...
Nastassia's user avatar
0 votes
1 answer
22 views

csv import error by copy command in sqllite

i am importing a csv file data by IMPORT mytable FROM 'E:/code playground/csv files/research.csv' WITH (format csv); above command but gives error Execution finished with errors. Result: near "...
codepro's user avatar
0 votes
0 answers
24 views

Google Colab not importing jumpy after installing brax

I've tried restarting the runtime and pip installing brax again using this command, "!pip install git+https://github.com/google/brax.git@main", but regardless of how many times I do it, &...
Ethan's user avatar
  • 167
0 votes
1 answer
26 views

ModuleNotFoundError: No module named 'numpy', in Sublime IDE(Python)

Just downloaded Sublime text and was trying to test it. Simple programs which don't require importing anything are working just fine, but i m unable to import anything. I tried the simple import numpy ...
O2 Arya's user avatar
0 votes
1 answer
48 views

ImportError: DLL load failed while importing numpy_ops: The specified module could not be found. when importing spacy in Python

I was trying to import spaCy because I wanted to remove stop words. When I tried running the import line, it gave me the error mentioned in the title. I had installed spacy using python -m pip install ...
Ishaan Nirmal's user avatar
0 votes
0 answers
22 views

Import Error while making a package using setup.py

I am trying to build a python package which has a setup.py file , I created an entry point but I run through it then it gives import error otherwise if run normally in vs code it does not gives import ...
priya yadav's user avatar
0 votes
0 answers
21 views

How to import a library only if it exists in Vite?

Let's say in my library I want to import an animation library only if the developer has installed it. Pseudo code as follows: let utility = null // If the library returns the library location as a ...
DarkGhostHunter's user avatar
-1 votes
0 answers
16 views

Handle a module locally

I am using this open source extension in my project. I have imported it and it works fine. But now I want to make some changes to the code. So instead of import BpmnColorPickerModule from 'bpmn-js-...
Jean-Christophe's user avatar
0 votes
2 answers
57 views

ImportError: cannot import name 'MovingAverage' from 'darts.models'

When I try to import MovingAverage, I get an import error. ImportError: cannot import name 'MovingAverage' from 'darts.models' (/usr/local/lib/python3.10/dist-packages/darts/models/__init__.py) Of ...
Bon's user avatar
  • 9
0 votes
0 answers
31 views

Module is not imported from the current directory

I have the following directory structure: project/ ├── src/ │ └── main.py └── modules/ ├──__init__.py └──futures.py I want to import modules from futures.py into main.py, but I get the ...
VCooper's user avatar
  • 21
0 votes
1 answer
42 views

ImportError: cannot import name 'Base' from 'schema'

I am receiving the following error and I cannot find any circular dependencies. ImportError: cannot import name 'Base' from 'schema' I've organized my code into packages, like so: customers/__init__....
KrimblKrum's user avatar
3 votes
1 answer
43 views

ImportError for Nonexistent File in Django's Main Branch After Working on Separate Branch

I'm encountering an ImportError in my Django project involving branch management. Here's what I did: New branch: In a branch named test-new-spider, I created and committed a file named spider_base.py,...
Myst09's user avatar
  • 33
0 votes
1 answer
62 views

How to solve theano - circular import problem in python?

I try to run some code from 2019 in my jupyternotebook. I have error that I don't know how to solve: ----> 8 import theano.tensor as T ... File ~/my-jupyter-env/lib/python3.11/site-packages/...
Jan Nowak's user avatar
0 votes
0 answers
47 views

libimagequant.so.0: cannot open shared object file: No such file or directory

When importing matplotlib, I get the following error: Traceback (most recent call last): File "/home/adama/Code/MachineLearning/HW6/problem1.py", line 6, in <module> import ...
pluto_412's user avatar
0 votes
1 answer
57 views

Can't import langchain modules: Import "langchain.indexes" could not be resolved

while I was following the instructions of a tutorial on youtube, I noticed that I get an Error when trying to import the langchain modules altough I installed langchain. My versions are: Langchain ...
Halosij Domniik's user avatar
-1 votes
0 answers
26 views

How to solve ´cannot import name 'libpdalpython' from partially initialized module 'pdal' (most likely due to a circular import)

I tried to ´import pdal´ in Visual Studio Code and I get the following error: ImportError: cannot import name 'libpdalpython' from partially initialized module 'pdal' (most likely due to a circular ...
Lucia Götz's user avatar
0 votes
0 answers
16 views

Importing 3D Scene into VR Project in Unity does not work

I recently modeled a space station in Unity (in a 3D template, using assets from the unity asset store). My friends had set up a VR template project into which I wanted to drag the space station. ...
Julius Arendt's user avatar
0 votes
1 answer
249 views

Databricks ImportError: cannot import name 'override' from 'typing_extensions'

I am trying to use a databricks notebook to finetune the Llama2 model. The code for this is here. I'm running into an error at lines 219-231: from trl import SFTTrainer max_seq_length = 512 trainer =...
Livia Seiler's user avatar
0 votes
1 answer
26 views

ImportError: cannot import name '_validate_location' from 'folium.utilities'

I tried this code: from folium.plugins import MarkerCluster # let's start again with a clean copy of the map of San Francisco sanfran_map = folium.Map(location = [latitude, longitude], zoom_start = ...
Ibrat Usmonov's user avatar
0 votes
0 answers
86 views

Binding a C++ library using pybind11 - ImportError

Im trying to bind a c++ library using pybind11. the compilation works well, but I had an error when I tried to import the .so file in a python file: from project_pybind11 import * I have this error : ...
AAUDI's user avatar
  • 11
0 votes
0 answers
25 views

Importerror for spacypdfreader

All of a sudden my code doesn't work anymore since the error like in the title pops-up. It happens when running the following code: from spacypdfreader.spacypdfreader import pdf_reader Output: -------...
Quinten's user avatar
  • 36.6k
0 votes
0 answers
34 views

python prompt_toolkit ImportError

I've created a simple script to begin building a python prompt with prompt_toolkit but am getting the following error: ImportError: cannot import name 'PromptSession' from partially initialized module ...
sadmicrowave's user avatar
  • 40.2k
0 votes
0 answers
80 views

Pyinstaller: Missing optional dependency 'openpyxl'

Update: By switiching from Anaconda (Python) to Python (standalone), creating a virtual enviroment and run everything within this environment, it worked perfectly fine! So I can recommend this if you ...
Patricia's user avatar
0 votes
1 answer
47 views

How to import a module in Python from a different directory?

I have the following directory structure: - Milestone/ - kk.py - Repeat_Modules/ - __init__.py - Automations.py I want to import the Automations.py file into kk.py. How can I achieve this?...
Selfdev.py's user avatar
3 votes
2 answers
82 views

What causes an ImportError to report "(unknown location)"?

Looking at this question, there is this import error: >>> from flask_security import login_user Traceback (most recent call last): File "<stdin>", line 1, in <module> ...
John Gordon's user avatar
  • 30.4k
0 votes
1 answer
82 views

ModuleNotFoundError when importing my own python module

so the problem is that when I try to import something from the module I created, I run into ModuleNotFoundError: No module named '<my_module>'. My project structure is just like this one: ├── ...
syrok's user avatar
  • 135
0 votes
0 answers
22 views

ImportError: Relative Import with No Known Parent Package

when I run this from game import resources this occur ImportError: cannot import name 'resources' from 'game' This is how my folders are arranged
Kewei Chen's user avatar
0 votes
1 answer
33 views

Unable to import modules from a directory

I have created a file main.py which imports out_handler.py which imports style_generator.py but every time I try to implement it with import I get this error Traceback (most recent call last): File ...
Mayank Kumar Gupta's user avatar
0 votes
0 answers
43 views

ImportError: cannot import name 'keras' from 'tensorflow' (unknown location) keras3.14 python 3.9

i use python 3.9 conda vscode when i add this line from tensorflow import keras i get the error i tried to u,stall and install tensorflow, keras, upgrade them i get the same error my version of ...
dreamv's user avatar
  • 3
0 votes
1 answer
68 views

Why am I gettitng ModuleNotFoundError when importing file in directory?

I have opened a remote github repository in vs code that contains a project for uni. The structure of the project is as follows: walking_panda └──__init__.py └── cli.py └── panda.py walking_panda.py ...
Daniel Akomolafe's user avatar
1 vote
0 answers
462 views

ImportError: cannot import name 'override' from 'typing_extensions'

Not sure whats causing this error but it occurs on Jupyter Notebook and Spyder when running the following code: `'''!pip install peft !pip install -i https://test.pypi.org/simple/ bitsandbytes !pip ...
mochi_bunny's user avatar
0 votes
0 answers
3 views

ImportError: cannot import name 'ImpliciteSourceTerm' from 'fipy'

I want to solve the Advection-Diffusion equation with a source term in fipy. For my source term, I consider an input coefficient (inputCoeff) and an output coefficient (outputCoeff). When invoking the ...
Marie's user avatar
  • 1
0 votes
0 answers
31 views

I already installed haystack on my visual code I used pip install farm-haystack. But I am still getting error when I am importing libraries

Import "haystack.file_converter.pdf" could not be resolved Import "haystack.document_store.memory" could not be resolved Import "haystack.retriever.sparse" could not be ...
cess's user avatar
  • 1
3 votes
1 answer
78 views

Writing code that uses tqdm but seamlessly avoids it if tqdm is not installed

I want to write a python code that uses tqdm for showing a progress bar, but if tqdm is not available then my code should just run without using tqdm's progress bar and without raising an ImportError ...
jointfull's user avatar
0 votes
0 answers
71 views

ImportError: cannot import name 'odds_ratio' from 'scipy.stats.contingency'

I'm trying to import the odds_ratio function from scipy.stats.contingency, but when I input the following: from scipy.stats.contingency import odds_ratio I get the error message: ImportError: cannot ...
Kristina's user avatar
1 vote
1 answer
51 views

Can import all THREE.js post processing modules as ES6 modules except OutputPass

I am trying to replicate this example but with modules imported from CDN. With the following import map: <script async src="https://unpkg.com/es-[email protected]/dist/es-module-shims.js"...
Mr. Developerdude's user avatar
0 votes
0 answers
48 views

ImportError: GSSAPIProxy requires the Python gssapi library

Hello after updating to python 3.11.5 i am getting this particular import error on all of my scripts. Anyone knows what i need to install/update for this ImportError: GSSAPIProxy requires the Python ...
Learner's user avatar
  • 335
0 votes
0 answers
97 views

Langchain is experiencing issues on AWS lambda for database_uri, consistently raising an 'ImportError: libmariadb.so.3' error. for a MySQL database

langchain is not working on AWS , It is always giving "ImportError: libmariadb.so.3: cannot open shared object file: No such file or directory" , nowhere i am using mariadb when executing ...
Akash Kumar's user avatar

1
2 3 4 5
69