Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

importing qmc as submodule in scipy

When I write from scipy.stats import qmc I face Import Error in Jupyter notebook:

ImportError: cannot import name 'qmc' from 'scipy.stats' (C:\winapps\Anaconda3\lib\site-packages\scipy\stats\__init__.py)

I want to do Halton sampling, how can I solve this problem?

like image 991
saeed Avatar asked Dec 06 '25 13:12

saeed


1 Answers

The qmc module was added in version 1.7.0 of scipy (around July 2021). You probably need to update the package. Since you are using Anaconda, you can use:

conda install scipy=1.7

Although this might break you base environment. Instead, you would better off creating a new environment using conda:

conda create -n myenv scipy=1.7 pandas ipykernel
like image 123
James Avatar answered Dec 08 '25 02:12

James



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!