importerror

Why pip saying import error after downgrading?

Why pip saying import error after downgrading? Question: I downgraded pip to install some packages. but now pip is not working saying. my python version is 3.11.5 and used this command “sudo python -m pip install pip==18.0 –upgrade”. Here is the result for pip install <module_name> I was expecting any solution for this issue as …

Total answers: 2

How to fix SimpleQueue error when importing the Laspy module in Python?

How to fix SimpleQueue error when importing the Laspy module in Python? Question: When importing Laspy I get the following error: import laspy as lp ImportError: cannot import name ‘SimpleQueue’ The error occurs in the following line of the Laspy module: from queue import Queue, SimpleQueue I tried updating Python because it was likely to …

Total answers: 1

Rock Paper Scissors game gone wrong. Random function Error

Rock Paper Scissors game gone wrong. Random function Error Question: I am writing code for a rock paper scissors game, and when i start writing computer choice with the random function, I get this: TypeError: randint() missing 1 required positional argument: ‘b’ Here’s the code: import random ai_choice = random.randint([0, 2]) if int(ai_choice) == 0: …

Total answers: 3

ImportError: DLL load failed while importing _fblas

ImportError: DLL load failed while importing _fblas Question: While I was importing statsmodels.api as sm it shows this error, how can I fix it? the same error appeared when I tried to import scipy.stats. And both of them worked well while doing the import statsmodel and import scipy ErrorDescription ErrorDescription I tried to reinstall it …

Total answers: 1

Impossible to import model_utils module in Django models.py

Impossible to import model_utils module in Django models.py Question: I follow the official documentation of the django-model-utils model and I’ve just done pip install django-model-utils in my virtual environment. However, VSCode indicates that Import "model_utils.managers" could not be resolved as shown below. VSCode error display With pip list I’ve checked that the module is effectively …

Total answers: 1

Struggling with python's import mechanism

Struggling with python's import mechanism Question: 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 src/ bunch of …

Total answers: 2

Cannot import name 'get_cloud_client' from 'gretel_client'

Cannot import name 'get_cloud_client' from 'gretel_client' Question: I keep getting the error Cannot import name ‘get_cloud_client’ from ‘gretel_client’ when I import using from gretel_client import get_cloud_client client = get_cloud_client(prefix="api", api_key="prompt") client.install_packages() I have followed all documentation and tutorials which say to just install using !pip install -U gretel-client and I have checked that the package …

Total answers: 1

How can I resolve import errors?

How can I resolve import errors? Question: pip install easyAI from easyAI import TwoPlayersGame, id_solve, Human_Player, AI_Player from easyAI.AI import TT ImportError: cannot import name ‘TwoPlayersGame’ from ‘easyAI’ (/usr/local/lib/python3.7/dist-packages/easyAI/__init__.py) Asked By: sseop || Source Answers: If you have pip installed, you can type this in a terminal sudo pip install easyAI. Otherwise, download the source …

Total answers: 2

pytest cant import modules and gives SyntaxError

pytest cant import modules and gives SyntaxError Question: I am using pytest to test my functions in a directory that looks like this: ├── my_dir ├── Sam_Functions ├── __init__.py ├── AD.py ├── Pr.py ├── Test_Functions ├── __init__.py ├── test_AD.py ├── test_Pr.py AD.py and Pr.py work fine with no issues. However, in pytest I face these …

Total answers: 2