I want to use sklearn_theano package in Google colab.
However, I simply do that :
import sklearn_theano
and get
ModuleNotFoundError: No module named 'sklearn_theano'
How to make the library available ??
Here's an example notebook demonstrating the install:
https://colab.research.google.com/drive/1gYny47qg3I3iiI-i5oMKuu4ZSsIzUiIJ
It mirrors the published installation instructions.
!pip install -q library
where library is what you want to install.
Related
I am trying to use the Scratch library.
For example:
from scratch.probability import normal_cdf
from scratch.linear_algebra import Vector, dot
#...
I installed Scratch using pip install scratch but I receive this error: ModuleNotFoundError: No module named 'scratch'.
Can you help me?
pip install scratch will install this: https://pypi.org/project/scratch/
But I guess that what you want to use is that: https://github.com/joelgrus/data-science-from-scratch
The second one is not meant to be installed through pip but used directly in a clone of the project as documented in its README.
About pip install scratch-probability (https://pypi.org/project/scratch-probability/#description), as it's not documented, you need to go check the content of the tarball to know how the package inside are named (if they are what's expected).
I'm trying to use Azure Databricks to launch Python script that imports the library: "simple_salesforce"
I have installed the library as shown on the picture bellow, please note that while installing the library the name should be "simple-salesforce" and while importing it "simple_salesforce" (just to mention that I didn't mistaken the name):
Installation of the library
As shown on the picture bellow, the library was installed successfully:
simple-salesforce installed
When try to import it in my workspace, using:
import simple_salesforce
I get the following error (see the error picture bellow):
ImportError: No module named 'cryptography.hazmat.primitives.asymmetric.ed25519'
Error
I've tried to install the "cryptography" library with the same method I used to install the other libraries (see the picture bellow), but I still get the same error:
cryptography
Is there any step that I missed ?
Best regards,
You don't have the library "cryptography" installed. It is very likely that you are using a Databricks runtime version of 5.5 LTS or less, with one worker.
The problem is that you have a Databricks cluster with Python3 and the notebook is running on a Python2 kernel.
Method 1
Check if you have python 3:
%sh
python3 --version
Then install pip3:
%sh
sudo apt install python3-pip
After that you can install "cryptography"
Method 2
I highly recommand this method, which consists of using 7.4 Databricks Runtime version with a minimum of 2 workers, then you will have python3 and the library "cryptography" installed by default.
You will just need to install simple-salesforce manually from the libraries part, and:
import simple_salesforce
I'm using notebooks.azure.com to learn python. I'm trying to manage Blobs with python sdk.
MUCH of the documentation I come across mentions pip install azure-storage-blob then using the BlobServiceClient (class?) to interact with Azure Storage.
UNFORTUNATELY, I get the error: ImportError: cannot import name 'BlobServiceClient' when trying to call from azure.storage import BlobServiceClient. This occurs after installing and upgrading azure-storage (v0.36.0) and azure-blob-storage (v12.3.0).
Here is a public Notebook showing the issue
Does this mean notebooks.azure.com is using the python v2.1 SDK (which appears to use BlockBlobService instead of BlobServiceClient)
How do I check which version of the python SDK my Azure Notebook is running?
EDIT 1:
No change after running !pip install azureml-sdk\[notebooks,automl\] --upgrade
Did you try
pip install --upgrade azureml-sdk\[notebooks,automl\]
azure-storage is deprecated, don't use that.
I got the following error:
from azure.storage.blob import BlockBlobService
ImportError: cannot import name 'BlockBlobService'
when trying to run my python project using command prompt. (The code seems to work when i execute it directly from anaconda navigator.)
I am using Python 3.6.4 for Anaconda. Running pip freeze gives me the following:
azure-nspkg==2.0.0
azure-storage-blob==1.1.0
azure-storage-common==1.1.0
azure-storage-nspkg==3.0.0
azurepython3==1.7.7
There is no need to install the entire azure package.
I believe you are using the new azure-storage-blob library, but since BlockBlobService is from the old azure-storage library, to continue using it, you need to pip uninstall azure-storage-blob if you have installed the new library by accident, and then pip install azure-storage to install the old library.
If you would like to use the new library or cannot do the above, feel free to refer to my answer here which details the context and full instructions of using either the new azure-storage-blob library or the old azure-storage library.
I have download language-check package and pasted in D:\Lib\site-packages\nltk but when I type the code over python interpreter as:
import language_check
It gives me an error: no module named language_check.
You need to properly install the package first, for example using
pip install language_check
here are a couple of links to help you:
https://docs.python.org/3/installing/
How do I install Python packages on Windows?