Issues Installing Modules (seaborn & statsmodels)
Hey guys, I'm using Python within pycharm to do some data analysis and statistics. I'd like to use seaborn with statsmodels to do this, however both those modules are failing to install.
Installing both in the GUI or with pip yields no errors, but when trying to import them I get the following error:
"ImportError: DLL load failed: The specified module could not be found."
I would try installing them using Conda, but when trying to install that I get the following error:
"Could not find a version that satisfies the requirement menuinst (from conda) (from versions: none)
No matching distribution found for menuinst (from conda)"
I'm very new to Python so I would be grateful if someone could explain why this is happening and how I can fix it.
Thanks,
Daniel
I'm running the latest version of PyCharm on Windows 10
Please sign in to leave a comment.
Here's the full console output:
Hello Daniel,
Could you please provide me with screenshots:
1. PyCharm | Preferences | Build, Execution, Deployment | Console | Python Console
2. PyCharm | Preferences | Project Interpreter
Do you see the packages present in the list?
Same here.
`setup.py clean` is not supported, use one of the following instead:
- `git clean -xdf` (cleans all files)
- `git clean -Xdf` (cleans all versioned files, doesn't touch
files that aren't checked into the git repo)
Add `--force` to your command to use it anyway if you must (unsupported).
----------------------------------------
Failed to build scipy
Failed building wheel for scipy
Failed cleaning build dir for scipy
Could not build wheels for scipy which use PEP 517 and cannot be installed directly
Dear Antonina Belianskaya,
Please see attached the requested screenshots. I assume you meant File > Settings not PyCharm > Preferences? Please note that I have not made any configuration changes as far as I know, other than installing some packages. I do see the referenced packages yes, as can be seen in the screenshot below.
Thank you for your support!
Hello Daniel,
Could you please try importing a package from the system terminal (outside of PyCharm) using the same interpreter/environment:
Go to File | Settings | Project: <project_name> | Project Interpreter (Preferences | Project: <project_name> | Project Interpreter for macOS) to find where your environment/interpreter is located;
Open your system terminal/cmd prompt and activate the same environment;
import seabornAlso, please try to re-create a virtual environment in PyCharm and check if there are any differences.
Dear Antonina Belianskaya,
Thanks for the tips. I should mention that I've tried this on another computer and it works, but I can see no reason it wouldn't work on this instance of Windows too.
I've followed the steps you provided, navigating to the interpreter folder and running the python.exe and trying to install the modules, but unfortunately I'm still getting "ImportError: DLL load failed: The specified module could not be found." When trying to run code reliant on them. Here is an example:
I have also tried changing the environment by making new ones and as shown above switching to the base interpreter.
Thanks again for any help. I am not sure why this is happening, clearly something is not installing or being set up as intended.
Hello Daniel,
If the issue is reproducible out of IDE, it confirms it caused by other components and not related to PyCharm.
I would recommend using external resources to find a solution, for example: https://github.com/pytorch/pytorch/issues/9263 or https://stackoverflow.com/questions/43549269/seaborn-importerror-dll-load-failed-the-specified-module-could-not-be-found
https://github.com/mwaskom/seaborn/issues/924