I've been struggling with the Azure library for a while now. I want to use Azure in python. I have azure.storage.blob installed (via pip install azure.storage.blob). I have upgraded it (also tried uninstalling and reinstalling) to version 12.8.1. I'm currently running python 3.7.6.
In spite of all this, I keep getting
from azure.storage.blob.sharedaccesssignature import BlobSharedAccessSignature
ModuleNotFoundError: No module named 'azure.storage.blob.sharedaccesssignature'
I see the module here: https://azure-storage.readthedocs.io/ref/azure.storage.blob.sharedaccesssignature.html
So I'm not sure why it's not recognized. Any ideas?
The reason you're getting this error is because BlobSharedAccessSignature is part of the old version of the SDK (azure-storage) whereas you're working with the newer version of the SDK (azure.storage.blob version 12.8.1).
To generate a shared access signature on a blob, you will need to use generate_blob_sas() function in the new SDK.
Related
I am trying to integrate Amibroker 6.41 (64-bit) with Python. Currently, I have Python 3.11.1 (64-bit) stand-alone installed along with NumPy, and pandas installed using pip in the python library.
I have installed AmiPy.dll into the Amibroker plugin folder and Amibroker acknowledged its presence.
Need your advice on the following error received while trying to set up cointegration afl using python.
Error 99. Error occurred during Python execution: *ModuleNotFoundError: No Module named '_ctypes' *callback:
It seems to me that it is unable to import the following:
from ctypes._endian import BigEndianStructure, LittleEndianStructure
from ctypes._endian import BigEndianUnion, LittleEndianUnion
On further investigation, it seems that somehow my latest Python 3.11.1 doesn't have ctypes installed. Hence the AmiPy Dll is unable to import the above files.
Unable to decide what should be my next step to resolve this issue.
Finally solved the issue by uninstalling Python 3.11.1 and installing Python 3.10.8 as Python 3.11.1 is broken. The issue is highlighted in the bug report on GitHub (link given below)
So suggest all not to install or use Python version 3.11.1 due to DLLs not being added to sys.path in embedded startup on Windows.
[[1]: https://github.com/python/cpython/issues/100320][1]
I am attempting to import the google-cloud-firestore module in a python script on AWS Lambda. I have the module installed in my virtual environment and upload the code/packages in a zip folder, but receive the following error.
I have successfully imported and executed a script with the requests module using the same approach.
I have attempted to uninstall and reinstall the following modules to my virtual environment and still have no luck: google-cloud-firestore, grpcio, google-cloud-core.
Does anyone have a solution to this problem? What could I be missing here?
This thread gives me the impression that the google-cloud-firestore module cannot be used in a zip file. If this is the case, can I install the module at runtime?
Thank you for any and all advice!
Trying to access the todoist api, and I copied some code from the api documentation. However, on my system I get an error stating:
Unable to import 'todoist.api'pylint(import-error).
I installed it with:
pip install todoist-python
as mentioned in the documentation
from todoist.api import TodoistAPI
I get my error on the very first line. How do I not get this?
You did everything right, so it's probably related to the way your installation is set.
Be sure you are using the same python you used to install the library. Check if the library is installed (pip list) and check if you're using the right Python when running the code. It's possible that the library was installed in one version and you're using the other.
I had the same problem, I solved it by following the GitHub instructions, but the name of the module to install using pip is todoist.
I created a lambda function which upload data to snowflake. I installed a all requirements in folder and zipped along with my main python file. While running in AWS it shows an error:
no module found. Cryptography.hamtaz.bindings._constant_time.
But I have this module at specified path. I don't know why it shows an error. I don't know why the error is arise.
Here is the code:
main(event, context):
import snowflake.connector
cnx = snowflake.connector.connect( user='xxx', password='yyyyy', account='zzzz', database="db Name", schema = "schema Name" )
try:
query = "SELECT * FROM Table_Name"
cnx.cursor().execute(query)
finally:
cnx.close()
I recently encountered the same issue. It turned out my Lambda function runtime was Python 3.8 but the 'cffi' library had been compiled for Python 3.6. I created a new Lambda function with the Python 3.6 runtime and uploaded my deployment package to it and it began working right away.
I faced same issue recently and found it is a problem with windows environment, try to create linux environment, install Python, packages, zip your code with all libraries and then throw back to AWS lambda, hopefully it will work.
i needed to set up a virtualenv for my lambda package to work. i also found pip install snowflake-connector-python did not install some cryptography libraries, although if i navigated to the directory i wanted them to be put in, adding --target . did cause those libraries to get installed.
For python 3.6, when I encountered the error "Unable to import module 'main': No module named '_cffi_backend'" in an AWS Lambda Function, I was able to run mv _cffi_backend.cpython-36m-x86_64-linux-gnu.so _cffi_backend.so in my linux docker image with virtualenv and the issue was resolved. Like mentioned above, some dependencies might be better placed with --target, to get them where you need them
I am trying to run an image recognition code. Even after installing 'utils' I am still getting error that module not found. What should I change?
Check if your python version is compatible. According to docs it's up to python 3.4 and you seem to be using 3.6. Source - https://pypi.org/project/python3-utils/#data