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

I get this error when i try to open jupyter notebook using my anaconda command prompt. my anaconda navigator does not open as as well.
I tried uninstalling anaconda, deleting all the relevant files and re-installing it. i tried updating conda and anaconda using command prompt but nothing works.

website – ImportError: cannot import name ‘UserGroup’ from ‘bloodapp.models’ (/home/abbracx/Documents/virtualenv/Bloodbank/bloodapp/models.py

please what could be the possible cause of these error? i have no idea and have been trying to fix it for the pass 6 hours.

bloodapp.models has these:

from django.contrib.auth.models import AbstractUser
from django.utils import timezone
from django_countries.fields import CountryField
from django.urls import reverse
from django.utils.text import slugify
import random
import string
from Bloodbank import settings
from bloodrequestapp.models import BloodRequest


def _random_string_generator(size=10, chars=string.ascii_lowercase + string.digits):
    return ''.join(random.choice(chars) for _ in range(size))

class User(AbstractUser):
    is_verified = models.BooleanField()

class UserGroup(models.Model):

    BLOOD_GROUP = (('A+','A+'), ('B+', 'B+'),
                    ('O+', 'O+'),('O-','O-'),
                    ('A-','A-'),('B-','B-'),
                    ('AB+','AB+'),('AB-','AB-'))

    group_name = models.CharField(max_length=100)
    group_code = models.CharField(max_length=3, choices=BLOOD_GROUP)
    group_slug = models.SlugField(max_length=200, unique=True, blank=True)
    member= models.ManyToManyField(User, through='Membership', related_name='group_member')
    request = models.ManyToManyField(BloodRequest,related_name ='group_request')

    def unique_slug_generator(self, new_slug=None):

        if new_slug is not None:
            slug = new_slug
        else:
            slug = slugify(self.group_name_)
        
        Klass = self.__class__
        qs_exists  = Klass.objects.filter(group_slug=slug).exists()
        if qs_exists:
            new_slug = f'{slug}-{_random_string_generator(4)}'
            return self.unique_slug_generator(new_slug=new_slug)
        return slug

    def save(self, *args, **kwargs):
        self.group_slug = self.unique_slug_generator()
        super().save(*args, **kwargs)
    
    def __str__(self):
        return self.group_code

bloodrequestapp.models has these:

from django.contrib.auth.models import AbstractUser
from django.utils import timezone
from django_countries.fields import CountryField
from django.urls import reverse
from django.utils.text import slugify
import random
import string
from Bloodbank import settings
from bloodapp.models import UserGroup
from django.contrib.auth import get_user_model

class BloodRequest(models.Model):
    sender = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, verbose_name='receipient')
    receiver = models.ForeignKey(UserGroup, on_delete=models.CASCADE, verbose_name='donor')
    message = models.CharField(max_length=255)
    request_date = models.DateTimeField(default=timezone.now)
    
    def __str__(self):
        return f'{self.sender.username} sends a blood request to {self.reciever.group_name}'

Try to run Python programm from command line. ImportError: No module named mysql.connector

I’m new in programming. So I have a question about this error.
I’m trying to run programm from command line in PyCharm, and get this Error.

root@kali:~# python /root/PycharmProjects/lesson/ProL3/ner.py
Traceback (most recent call last):
File “/root/PycharmProjects/lesson/ProL3/ner.py”, line 2, in
import mysql.connector as sql
ImportError: No module named mysql.connector

Prog:

import mysql.connector as sql
from mysql.connector import Error
import argparse


connection = sql.connect(
    host="localhost",
    password="mroot",
    user="myro"
)
mycursor = connection.cursor()

parser = argparse.ArgumentParser(description='Database management', usage='Script option:')
parser.add_argument('-d', '--data', help="Create Databases")
args = parser.parse_args()

class Data:
    def __init__(self, database=''):
        self.database = database
        self.create_database()

    def create_database(self):
        try:
            mycursor.execute(self.database)
            print("The database was created!")
        except Error as e:
            print(e)


What should I do?

python – ImportError: unable to import the name & # 39; RasaNLUConfig & # 39; from & # 39; rasa_nlu.config & # 39;

here is the code

from rasa_nlu.training_data import load_data
from rasa_nlu.config import RasaNLUConfig
from rasa_nlu.model import Trainer
from rasa_nlu.model import Metadata, Interpreter

def train_nlu(data, config, model_dir):
    training_data = load_data(data)
    trainer = Trainer(RasaNLUConfig(config))
    trainer.train(training_data)
    model_directory = trainer.persist(model_dir, fixed_model_name = 'weathernlu')

def run_nlu():
    interpreter = Interpreter.load('./models/nlu/default/weathernlu', RasaNLUConfig('config_spacy.json'))
    print(interpreter.parse("I am planning my holiday to Lithuania. I wonder what is the weather out there."))

if __name__ == '__main__':
    train_nlu('./data/data.json', 'config_spacy.json', './models/nlu')
    # run_nlu()

I have the following error

Trace (latest recent calls):
File "F: Machine Learning WeatherBot nlu_model.py", line 2, in
from rasa_nlu.config import RasaNLUConfig
ImportError: Unable to import the name & # 39; RasaNLUConfig & # 39; from & # 39; rasa_nlu.config & # 39; (C: Users Abdul Rehman Wahlah Anaconda3 lib site-packages rasa_nlu config.py)
(Completed in 0.9s)

apt – ImportError: no module called error & # 39; _gdbm & # 39; when installing any package through pip / conda

I received the following error when downloading anything with Conda or pip, for example Numpy, Pandas, Pytorch, etc.

Traceback (most recent call last):
  File "/usr/lib/python3.5/dbm/gnu.py", line 4, in 
    from _gdbm import *
ImportError: No module named '_gdbm'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 7, in 
    import dbm.gnu as gdbm
  File "/usr/lib/python3.5/dbm/gnu.py", line 6, in 
    raise ImportError(str(msg) + ', please install the python3-gdbm package')
ImportError: No module named '_gdbm', please install the python3-gdbm package

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/command-not-found", line 27, in 
    from CommandNotFound.util import crash_guard
  File "/usr/lib/python3/dist-packages/CommandNotFound/__init__.py", line 3, in 
    from CommandNotFound.CommandNotFound import CommandNotFound
  File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 9, in 
    import gdbm
ImportError: No module named 'gdbm'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in 
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in 
    import apport.fileutils
  File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in 
    from apport.packaging_impl import impl as packaging
  File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 20, in 
    import apt
  File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in 
    import apt_pkg
ImportError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/python3.5/dbm/gnu.py", line 4, in 
    from _gdbm import *
ImportError: No module named '_gdbm'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 7, in 
    import dbm.gnu as gdbm
  File "/usr/lib/python3.5/dbm/gnu.py", line 6, in 
    raise ImportError(str(msg) + ', please install the python3-gdbm package')
ImportError: No module named '_gdbm', please install the python3-gdbm package

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/command-not-found", line 27, in 
    from CommandNotFound.util import crash_guard
  File "/usr/lib/python3/dist-packages/CommandNotFound/__init__.py", line 3, in 
    from CommandNotFound.CommandNotFound import CommandNotFound
  File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 9, in 
    import gdbm
ImportError: No module named 'gdbm'

And when I try to install python3-gdbm as suggested in the error, the following error appears:

sudo apt-get install python3.5-gdbm
Reading package lists … Done
Building dependency tree
Reading status information … Done
E: The python3.5-gdbm package cannot be found
E: No package could be found by regex & # 39; python3.5-gdbm & # 39;

Could anyone suggest what I should do to resolve this error?

command line – ImportError: missing dependencies required [‘numpy’]

I am trying to program some Python scripts with the Windows programmer. Unfortunately, I run into the following error when I try to run my script from the command prompt:

"Required dependencies {0} missing". Format (missing_dependencies))
ImportError: required dependencies are missing ['numpy']

The code that I am trying to execute is quite simple and only uses the following imports:

import pandas like pd
import xlwings as xw
import date and time as dt
import pyodbc

When the code is executed from the Anaconda indicator (and the desired environment is used), everything works fine:

(scheduler_env) C:  Users  a316283  Desktop  SQLProcessing  ScheduledReality> UpdateScheduledReality.py

In Jupyter Notebook (in the same environment) everything works perfectly as well.

Executing the following at the Command Prompt in the returns on the other side:

C: > C:  Users  a316283  .julia  conda  3  envs  scheduler_env  python.exe C:  Users  a316283  Desktop  SQLProcessing  ScheduledReality  UpdateScheduledReality.py

Tracking (recent calls latest):
File "C:  Users  a316283  Desktop  SQLProcessing  ScheduledReality  UpdateScheduledReality.py", line 1, in 
    import pandas like pd
File "C:  Users  a316283  .julia  conda  3  envs  scheduler_env  lib  site-packages  pandas  __ init__.py", line 19, in 
    "Required dependencies {0} missing". Format (missing_dependencies))
ImportError: required dependencies are missing ['numpy']

Drilling a bit more and simply running python in this environment:

C:  Users  a316283  .julia  conda  3  envs  scheduler_env> python.exe

Give a similar error when you try to import numpy:

>>> import number
Tracking (recent calls latest):
Case file "", line 1, in 
  File "C:  Users  a316283  .julia  conda  3  envs  scheduler_env  lib  site-packages  numpy  __ init__.py", line 140, in 
    since . import _distributor_init
File "C:  Users  a316283  .julia  conda  3  envs  scheduler_env  lib  site-packages  numpy  _distributor_init.py", line 34, in 
    since . import _mklinit
ImportError: DLL loading error: the specified module could not be found.
>>>

Any advice is more than welcome. Thank you.

*** I tried this in different environments, including my base environment, but I'm still running the same error. I uninstalled in reinstalled numbers and pandas in all my environments, without any results.

python – ImportError About libcublas.so.9.0

I'm facing a strange problem about & # 39; ImportError & # 39;

I have installed cuda9.0 and cuDNN7.0 to run tensorflow-gpu 1.5.0. After that, when I run

python3

in the terminal, and run

import tensorflow as tf

I can import it successfully. However, when I run

sudo python3

and write

import tensorflow as tf

Again, I received an error like this:

ImportError: libcublas.so.9.0: the shared object file can not be opened: no such file or directory exists

Also, when I use

sudo spyder3

or

sudo pycharm

or

sudo jupyter

and by importing tensorflow into it, I will get the same error.

Then, I wonder why the command & # 39; sudo & # 39; Can it result in such an error? And how can I fix it? Is there someone who can help me?

Thank you!!!!!

This is the first time I ask in & # 39; askubuntu & # 39 ;, and maybe I wrote in an incorrect format. If so, I apologize for it 🙂