Pystan has been installed successfully on EMR nodes (master, task and core nodes), but I still get this error
ModuleNotFoundError: No module named pystan
I installed pystan using pip install pystan through boostrap_scrtip_actions.
Does anyone know what could be the issue?
I use Python 3.7, emr 6.3.0.
Found the issue, posting the answer here for others.
When installing the pystan without specifying the version, it installs the latest version and in the latest version of pystan, it uses stan as the main module and not pystan.
To resolve the issue, specify your version or use import stan instead.
Refer to the latest pystan doc https://pypi.org/project/pystan/
Related
I am trying to read a shapefile using python's geopandas in vscode. I successfully installed geopandas using conda, but when I use gpd.read_file, I get the following error output:
ImportError: the 'read_file' function requires the 'fiona' package, but it is not installed or does not import correctly.
Importing fiona resulted in: DLL load failed while importing ogrext: The specified module could not be founds
I am trying to follow the following solution: ImportError: the 'read_file' function requires the 'fiona' package, but it is not installed or does not import correctly. Importing fiona resulted in:
Apparently, I was using below versions of GDAL and fiona combinations which didn't work for me.
GDAL-3.3.2-cp38-cp38-win_amd64.whl
Fiona-1.8.20-cp38-cp38-win_amd64.whl
I had to uninstall the above versions and install the below versions instead. This resolved the issue.
GDAL-3.2.3-cp38-cp38-win_amd64.whl
Fiona‑1.8.19‑cp38‑cp38‑win_amd64.whl
Should I uninstall gdal and fiona using pip uninstall gdal fiona and then use pip install <version> to install the working versions? Also, since the post is from Oct 2021, should I still use the mentioned versions?
I'm getting an error when importing the skbio package on Google Colab. The error message is related to SpearmanRConstantInputWarning of the scipy.stats package. What should I do to solve this problem?
I've tried to uninstall and install skbio and scipy, but it has not worked.
Seems to be some issue with the version. If you run
pip install scikit-bio==0.5.6
it shouldn't show that problem, at least it worked when I tried for 0.5.6 and 0.5.5 in Colab.
I had a similar problem, but could not downgrade to scikit-bio==0.5.6 as it conflicted with my Python version (3.10). An alternative workaround is downgrading scipy:
conda install -c conda-forge scipy=1.8
Presumably which package to downgrade will depend on your circumstances.
(Would have added as a comment to 3991santiago's answer but I do not have the reputation)
I am using Python 3.6 in anaconda on Windows 10.
I have tried to install the resource package using pip install resource.
It says Requirements already satisfied. But still import resource showing the same error.
How to resolve this issue on Windows?
I installed Python package Fiona. When I try to import it in my application, I get the following error:
File "C:\Anaconda3\lib\site-packages\fiona\collection.py", line 7, in
from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
ImportError: DLL load failed: The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.
I used Windows's "Event Viewer" and checked the problem:
Activation context generation failed for
"C:\Anaconda3\Library\bin\netcdf.dll". Dependent Assembly
Microsoft.VC90.DebugCRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
could not be found. Please use sxstrace.exe for detailed diagnosis.
From this question I gather that some module is using a debug library, which it shouldn't. I thought that maybe it's GDAL? How can I detect whether Fiona itself or some dependency of Fiona is doing it?
I tried to uninstall Fiona (and GDAL) and reinstall them.
I can successfully uninstall and install them using:
conda uninstall fiona
conda uninstall gdal
conda install fiona
conda install gdal
But the error remains.
I got my code working by using the Windows binaries from the following page:
http://www.lfd.uci.edu/~gohlke/pythonlibs/
and installing them with the command:
pip install C:\<path>\some_wheel.whl
I installed sci-kit learn with the installer scikit-learn-0.13.1.win32-py2.7.exe but when I try to call it in Canopy and iPython I get the following error: "ImportError: No module named sklearn".
I tried the following solutions found online but non of them work
Running python setup.py install in the directory and got this error: "ImportError: no module named sklearn._build_utils"
Tried pip install - U scikit-learn but the download keeping on timing out
Tried easy_install - U scikit-learn but the download also kept on timing out
I'm wondering if it is because I am using Canopy (Free version) and I should maybe uninstall it and install all my packages again using vanilla Python.
Thanks.
Have you tried adding sklearn to your python path manually? Have a look at this thread, it might help!
How to add to the pythonpath in windows 7?