Import Error: pymc_experimental
Not Found After Installation (original) (raw)
Hi everyone,
I’m reaching out for some assistance with an import error I’m encountering in Python.
I’m trying to use the pymc_experimental
library for a project. I followed the installation instructions and used the command:
pip install git+https://github.com/pymc-devs/pymc-experimental.git
The installation process seemed successful, and pip
reported “Requirement already satisfied” when I checked again.
However, when I attempt to import the library in my Python code:
import pymc_experimental as pmx
I receive the following error:
ModuleNotFoundError: No module named 'pymc_experimental'
Same goes for any other class from the module
Troubleshooting Steps Taken:
- I’ve verified the installation using
pip
. - I’ve ensured I’m running the code in the correct environment where
pymc_experimental
is installed (pymc_env)
Despite the seemingly successful installation, I’m still encountering the import error. Could anyone offer insights into why this might be happening and how to resolve it?
Thank you in advance for your help!
Best,
John
If you do a vanilla pip install (without git+) does it work?
JohnM June 22, 2024, 10:59pm 4
No, it did not work.
% pip install GitHub - pymc-devs/pymc-experimental
Collecting GitHub - pymc-devs/pymc-experimental
Downloading GitHub - pymc-devs/pymc-experimental
\ 353.7 kB 788.8 kB/s 0:00:00
ERROR: Cannot unpack file /private/var/folders/p_/4shh5wgx7vn_sp4_77tp6c7m0000gn/T/pip-unpack-2k4g2ixc/pymc-experimental.git (downloaded from /private/var/folders/p_/4shh5wgx7vn_sp4_77tp6c7m0000gn/T/pip-req-build-4513ez_r, content-type: text/html; charset=utf-8); cannot detect archive format
ERROR: Cannot determine archive format of /private/var/folders/p_/4shh5wgx7vn_sp4_77tp6c7m0000gn/T/pip-req-build-4513ez_r
Same thing for some variations of that
Something seems very broken with your environment. Can you try to start from scratch?
JohnM June 23, 2024, 1:36pm 6
I have installed a new environment from stratch following the exact instructions for pymc. Terminal confirmed the installation of the pymc experimental. Nonetheless, it cannot be imported in either way.
Perhaps, either there is a bug in the last version or I am missing the correct way to import the module.
I have tried
import pymc as pm
import pymc_experimental as pmx
and
import pymc as pm
import pymc_experimental
All failed showing up an error module was not found
Anything that can help will be appreciated
Thanks
Have you tried running python from the terminal after activating the environment, instead of from jupyter/vscode and importing the library?
JohnM June 23, 2024, 8:06pm 8
I have now solved. It was an issue of a broken environment in conda.
Thanks for your time!