3

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?

James
  • 32,991
  • 4
  • 47
  • 70
saeed
  • 29
  • 1
  • 4

1 Answers1

4

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
James
  • 32,991
  • 4
  • 47
  • 70