not able to import local python library - python

I created a python module and installed it.
pip3 install amnilogger.0.1.3.tar.gz
I confirmed it got installed by using pip3 list
pip3 list
- output:
Amnilogger 0.1.3
but when I'm trying to import it, it says module not found
import Amnilogger # no module

Related

How to properly import the ConfigServiceV2Client attribute from google-cloud-logging_v2 package in Python?

I tried importing the ConfigServiceV2Client attribute as follows:
from google.cloud.logging_v2.services.config_service_v2 import ConfigServiceV2Client
And I got the following error:
AttributeError: module 'google.cloud.logging_v2' has no attribute 'ConfigServiceV2Client'
How should I import it?
Based on the error that you're getting it seems like you are missing some updated features, Install the google-cloud-logging package using pip as follows:
pip install --upgrade google-cloud-logging
based on the google documentation.
After installing it try importing it in to your project.
Or just uninstall the package:
pip uninstall google-cloud-logging
And then reinstall it.

Pycharm not finding module installed (dnspython) in venv [duplicate]

I want to check MX-Record from Python. So I installed the dnspython package, but when I try to import following library:
import dns.resolver
It shows the following error:
ModuleNotFoundError: No module named 'dns'.
I use PyCharm and Python 3.
You should install https://github.com/rthalley/dnspython first
pip install dnspython

Module Not found when importing PyCaret in Jupyter

I'm trying to learn PyCaret but having a problem when trying to import it in Jupyter Lab.
I'm working in a virtualenv and installed pycaret via pip:
pip install pycaret
I can confirm its installed via pip list:
prompt-toolkit 3.0.7
protobuf 3.13.0
py 1.9.0
pycaret 2.1.2
pycparser 2.20
The very first line in the notebook is:
from pycaret.nlp import *
however this results in:
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-3-7c206b4a9ead> in <module>
----> 1 from pycaret.nlp import *
2 import psycopg2
3 import sys, os
4 import numpy as np
5 import pandas as pd
ModuleNotFoundError: No module named 'pycaret'
I'm pulling my hair out trying to figure this out and can't find anyone else with something similar.
I've tried to import via the python shell as well and that works perfectly.
You should create a seperate environment for installing time series alpha module
after creating a new environment and switching into
pip install pycaret-ts-alpha
and then you will be able to access
https://towardsdatascience.com/announcing-pycarets-new-time-series-module-b6e724d4636c
I forgot that you had to install modules via Jupyter.
Following this guide: http://jakevdp.github.io/blog/2017/12/05/installing-python-packages-from-jupyter/index.html
Installing like so:
# Install a pip package in the current Jupyter kernel
import sys
!{sys.executable} -m pip install numpy
Got it working
First Create a new environment conda documentation
Second Download the Pycaret with this instruction
Third check your sklearn version is greater thansklearn>=0.23.2.
Because if it's greater PyCaret is not compatible with that.
Nothing works for you? Download directly from github with this command
pip install git+https://github.com/pycaret/pycaret.git#egg=pycaret
I read on the tutorial page of pycaret that to install it through a Jupyter-notebook you should add an exclamation mark in front of the python command in the Jupyter-cell:
!pip install pycaret

can not import pascalize, depascalize from humps package python

Hello my friends plz help me with this strange problem
1-In my terminal of linux mint I can easily install package humps and then use from humps import pascalize, depascalize with no problem
2-But when I create a virtualenv of pythonand I can install package humps and I can use import humps but I can't use from humps import pascalize, depascalize or humps.pascalize("some_string")
it will cause an ImportError: cannot import name 'pascalize' and AttributeError: module 'humps' has no attribute 'pascalize'
It's likely that you typed pip install humps instead of pip install pyhumps.
Or add in your requirements file:
pyhumps==3.7.1
Pypi - pyhumps
Documentation - humps

How to use DNS resolver in Python 3?

I want to check MX-Record from Python. So I installed the dnspython package, but when I try to import following library:
import dns.resolver
It shows the following error:
ModuleNotFoundError: No module named 'dns'.
I use PyCharm and Python 3.
You should install https://github.com/rthalley/dnspython first
pip install dnspython

Categories

Resources