0

Just installed python, and am running into this error:

ImportError: No module named 'semanticnet'

here are my imports:

import semanticnet as sn
import sys

I've tried the solution on this site that suggests adding:

sys.path.append('C:\Python34')

after the 'import sys', but no luck.

Does anyone know what could be causing this issue?

Here is my full code: https://ideone.com/UHRI4S , running windows 10

Edon
  • 1,116
  • 2
  • 22
  • 47
  • 1
    have you installed the module? if not, there are some good tips [here](http://stackoverflow.com/questions/1449494/how-do-i-install-python-packages-on-windows) – patrick Jun 29 '16 at 21:55
  • You're hitting the error before you even get to the line with `import sys` -- You need to install `semanticnet` – sytech Jun 29 '16 at 21:56
  • sorry for the late replies, yes this was indeed the problem. Thanks for the help! – Edon Jun 30 '16 at 14:44

2 Answers2

0

You need to install that library, if you're on windows which it seems because of your "C://" first install setuptools.

https://pypi.python.org/pypi/setuptools

Using Windows 8 (which includes PowerShell 3) or earlier versions of Windows with PowerShell 3 installed, it’s possible to install with one simple Powershell command. Start up Powershell and paste this command:

(Invoke-WebRequest https://bootstrap.pypa.io/ez_setup.py).Content | python -

You must start the Powershell with Administrative privileges or you may choose to install a user-local installation:

(Invoke-WebRequest https://bootstrap.pypa.io/ez_setup.py).Content | python - --user

If you have Python 3.3 or later, you can use the py command to install to different Python versions. For example, to install to Python 3.3 if you have Python 2.7 installed:

(Invoke-WebRequest https://bootstrap.pypa.io/ez_setup.py).Content | py -3 -

Once installed run as follows:

easy_install semanticnet
MrJomp
  • 135
  • 6
0

I think you don't have the module installed.. try pip install semanticnet on the Prompt Command first(I believe that you installed pip when you installed python), then when the installation is complete, just run python and try some ´import semanticnet` on the python command line...

alvarosps
  • 83
  • 1
  • 11