I am trying to import jwt (JSON Web Token) into Python.
Following this I have installed the package. The package also seem to import in the terminal python environment.
>pip install PyJWT
>pip freeze
>PyJWT==1.4.2
>which pip
//anaconda/bin/jupyter
>which jupyter
//anaconda/bin/jupyter
>which jwt
//anaconda/bin/jwt
However, when I am trying to import jwt inside Jupyter, I get this error:
ImportError: No module named 'jwt'
How do I get the module to import in Jupyter?
It seems that I used a different Kernel.
After I switched Jupyter to 'Python[conda root]', package imported.
Related
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
I cannot seem to get pyrebase to import, despite it being installed. I have ran this:
pip3 install pyrebase4
and it successfully installed, upon doing pip freeze I can see:
Pyrebase4==4.50
However, when I try import it using
import pyrebase
it just spits out the error:
ModuleNotFoundError: No module named 'pyrebase'
I'm at a loss and have no idea what to do
I am trying to execute the Azure ml sdk from the local system using the Jupyter notebook. When I run the below code i am getting an error.
from azureml.core import Workspace, Datastore, Dataset
ModuleNotFoundError: No module named 'ruamel'
You have to add pip 20.1.1
Conda ruamel needs higher version of pip
conda install pip=20.1.1
I'm new to azure so excuse my lack of knowledge about the platform. I'm currently trying to run and deploy an azure function using python. these modules are currently found in my requirements.txt file
azure-functions
graphqlclient
requests
gql
asyncio
aiohttp
I run the following command pip install -r requirements.txt to install them, but for some reason, some modules cannot be found. for example the json module. import json works fine with any other python program. but when i try and add it to the requirements.txt file and run this command pip install -r requirements.txt i get the following error
ERROR: Could not find a version that satisfies the requirement json (from versions: none)
ERROR: No matching distribution found for json
i tried adding a version, but that did not solve my issue. thats only half my problem, i decided to ignore this problem for now and try to work with the modules that are working properly in the .txt file. moving on to my __init__.py file which is a timer trigger i have the following imports
import datetime
import logging
from graphqlclient import GraphQLClient
import requests
import asyncio
from gql import gql, Client
from gql.transport.aiohttp import AIOHTTPTransport
import azure.functions as func
but when i try and run my function i get the following error
Exception: ModuleNotFoundError: No module named 'gql.transport.aiohttp'
Can someone please explain these module erros? all these modules work fine when i run them from any other python program, so the problem seems to be from azure.
Thanks
I run the following command pip install -r requirements.txt to install them, but for some reason, some modules cannot be found. for example the json module.
Json is a standard library in python there's no need to install it.
Just include it in your python script as the following:
import json
Exception: ModuleNotFoundError: No module named 'gql.transport.aiohttp'
According to my test results, the default version of gql installed using the pip install -r requirements.txt command is 2.0.0.
If you use from gql.transport.aiohttp import AIOHTTPTransport to import AIOHTTPTransport, you need to install 3.x.x.
So this error is caused by version incompatibility.
Solution:
Please install the 3.x.x version of gql, you can uninstall the installed gql first, and then reinstall the new version of gql:
pip uninstall gql
pip install gql==3.0.0a5
I did some tests and the function can run normally.
I am trying to use Firestore with Python . I have successfully installed the google-cloud-firestore. But when I am trying to import the library using from google.cloud import firestore . It is throwing me the error
No module named 'google.api_core.client_options'
Note: I am not using the virtualenv
Is there any way i can resolve this
Try upgrading the google-api-core library:
/path/to/pip install --upgrade google-api-core