How to resolve cannot import the name coord_cython from pymatgen.util in pymatgen (2022.9.21) with python 3.8? - pymatgen

I am using the Linux operating system on a remote server. I used pip install to install pymatgen 2022.9.21 but I am getting an error which I have pasted below. I tried the older version of Pymatgen, but still could not resolve it. I would appreciate your suggestions.
Thank you.
ImportError: cannot import name 'coord_cython' from 'pymatgen.util' (/home/ikhatri/.local/lib/python3.8/site-packages/pymatgen/util/init.py)

Related

No module named 'nltk.lm' in Google colaboratory

I'm trying to import the NLTK language modeling module (nltk.lm) in a Google colaboratory notebook without success. I've tried by installing everything from nltk, still without success.
What mistake or omission could I be making?
Thanks in advance.
.
Google Colab has nltk v3.2.5 installed, but nltk.lm (Language Modeling package) was added in v3.4.
In your Google Colab run:
!pip install -U nltk
In the output you will see it downloads a new version, and uninstalls the old one:
...
Downloading nltk-3.6.5-py3-none-any.whl (1.5 MB)
...
Successfully uninstalled nltk-3.2.5
...
You must restart the runtime in order to use newly installed versions.
Click the Restart runtime button shown in the end of the output.
Now it should work!
You can double check the nltk version using this code:
import nltk
print('The nltk version is {}.'.format(nltk.__version__))
You need v3.4 or later to use nltk.lm.

How to install Azure module in IBM Data Science Experience

I'm trying to import Azure data into DSx. I get an error when I try to import the module. When I use the command "from azure.storage.blob import BlobService" in DSx, it tells me that there's no module with that name. Do I have to do some further setup in DSx to access this module?
Please install the azure package by running following command in your notebook:-
!pip install azure
then run this to import your library
from azure.storage.blob import BlobService
Please also refer to this article for different ways of installing libraries:-
http://datascience.ibm.com/docs/content/analyze-data/importing-libraries.html
Thanks,
Charles.

CryptoUnavailableError: No crypto library available and from oauth2client import crypt failure.

The error is in gspread authentication. Got
oauth2client.client.CryptoUnavailableError: No crypto library available
I have installed both pyOpenSSL and pycrypto. With the Crypto folder obtained after installation of pycrypto in my app directory.
I dug deeper on why the above error still persists. I found
from oauth2client import crypt
to be the cause. The following ImportError is being raised.
ImportError: No encryption library found. Please install either PyOpenSSL, or PyCrypto 2.6 or later
Please help. I earlier(few months ago) got it working by adding the following in my app.yaml. But this time it is not working.
libraries:
- name: pycrypto
version: "latest"
- name: ssl
version: latest
I use mac for development in case you need this to help me out. The thing is gspread used properly work using oauth2client. Today i tried to install google cloud storage client. I might have done something unknowningly during the installation process. After which the gspread authentication keeps failing. I have no clue on what to do next.
But note that the gspread authentication works flawlessly on production. I verified by pulling the production code.
I was able to fix this issue by reinstalling pyOpenSSL, cryptography.
But now i got another error.
ImportError: No module named cryptography.hazmat.bindings._openssl
ImportError: No module named cryptography.hazmat.bindings._openssl

Configure Web2Py to use Anaconda Python

I am new to Web2Py and Python stack. I need to use a module in my Web2Py application which uses "gensim" and "nltk" libraries. I tried installing these into my Python 2.7 on a Windows 7 environment but came across several errors due to some issues with "numpy" and "scipy" installations on Windows 7. Then I ended up resolving those errors by uninstalling Python 2.7 and instead installing Anaconda Python which successfully installed the required "gensim" and "nltk" libraries.
So, at this stage I am able to see all these "gensim" and "nltk" libraries resolving properly without any error in "Spyder" and "PyCharm". However, when I run my application in Web2Py, it still complains about "gensim" and gives this error: <type 'exceptions.ImportError'> No module named gensim
My guess is if I can configure Web2Py to use the Anaconda Python then this issue would be resolved.
I need to know if it's possible to configure Web2Py to use Anaconda Python and if it is then how do I do that?
Otherwise, if someone knows of some other way resolve that "gensim" error in Web2Py kindly share your thoughts.
All your help would be highly appreciated.
The Windows binary includes it's own Python interpreter and will therefore not see any packages you have in your local Python installation.
If you already have Python installed, you should instead run web2py from source.

webfaction hosted django app, shopify module will not import

I've recently created a site with a django app hosted by webfaction. In general, things are running as expected, but I am also trying to use the ShopifyAPI, and get "Import error, no module named shopify" traced to one of my views.py. Everything worked when developing on localhost.
I SSHed into the host server and tried to install the ShopifyAPI with easy_install. It seemed to have reported being successfully installed, but I'm not sure if this actually does anything real on an external server?
Does anybody have suggestions? Any limitations on ShopifyAPI that I may not have considered?
Thanks!
The easy_install command will install the module for Python2.4. You are likely using Python2.6 or Python2.7. If you are using Python2.6, enter:
easy_install-2.6 ShopifyAPI instead of easy_install ShopifyAPI.
If you are using Python2.7, enter:
easy_install-2.7 ShopifyAPI insead of easy_install ShopifyAPI.
You can read more about using easy_install on Webfaction here
After installing the API, restart your Apache instance and it should see the module as expected.