PRML icon indicating copy to clipboard operation
PRML copied to clipboard

ImportError: No module named 'prml'

Open jc-su opened this issue 6 years ago • 5 comments


ImportError Traceback (most recent call last) in () 4 get_ipython().run_line_magic('matplotlib', 'inline') 5 ----> 6 from prml.rv import ( 7 Bernoulli, 8 Beta,

ImportError: No module named 'prml'

jc-su avatar Mar 09 '18 14:03 jc-su

Did you install?

$ cd /path/to/PRML
$ pip3 install --user .

suvayu avatar Mar 13 '18 02:03 suvayu

Traceback (most recent call last):

File "/usr/local/lib/python3.5/dist-packages/IPython/core/interactiveshell.py", line 2910, in run_code exec(code_obj, self.user_global_ns, self.user_ns)

File "", line 5, in from prml.features import PolynomialFeatures

File "/usr/local/lib/python3.5/dist-packages/prml/init.py", line 1, in from prml import (

File "/usr/local/lib/python3.5/dist-packages/prml/feature_extractions/init.py", line 1, in from prml.feature_extractions.autoencoder import Autoencoder

File "/usr/local/lib/python3.5/dist-packages/prml/feature_extractions/autoencoder.py", line 11 self.parameter[f"w_encode{i}"] = nn.Parameter(np.random.randn(args[i], args[i + 1])) ^ SyntaxError: invalid syntax

jc-su avatar Mar 13 '18 14:03 jc-su

self.parameter[f"w_encode{i}"] = nn.Parameter(np.random.randn(args[i], args[i + 1])) ^ SyntaxError: invalid syntax

I met the problem too when I used python V3.5. I resolved the problem by using python V3.6.5.

hahahahaha320 avatar Apr 13 '18 09:04 hahahahaha320

step1: cd PRML-master step2: python setup.py build step3: python setup.py install

step4: cd notebooks step5: ipython notebook ch02_Probability_Distributions.ipynb it still report error: ImportError: No module named 'prml'

githubWangHC avatar Dec 24 '18 06:12 githubWangHC

clone the repository on you terminal commad of you IDE , run the following code git clone https://github.com/ctgk/PRML if you want to work online check out the link https://colab.research.google.com/drive/1OtBevAIJZsm-kZOjS_G-z7Czc3T6xHYe#scrollTo=U-pTAGoXla5e

said-ml avatar Feb 04 '24 19:02 said-ml