No module named simpy

1

I have installed SimPy using the pip install -U simpy command as set by this page link but trying to import it as import simpy gives me the error of the title:

  

ImportError: No module named 'simpy'

I have installed NumPy , Matplotlib and other libraries in the same way and they have not given me this problem, does anyone know what is due ?. I'm using Python 3.6.0

    
asked by Daniel V 22.03.2017 в 19:28
source

1 answer

1

You can use py -3.6 -m pip freeze in the terminal to get the name and version of all installed packages, see if there is SimPy between them. If it is not installed for something, if it did not give errors you may have several versions of Python installed in your operating system and installed in another.

When you have several versions of Python installed in the same operating system, if you do not specify the version in which you want to install the pip package, by launching pip in the terminal, it is executed by default in the version used by the system. default way to execute Python modules and it is in this version that the module is installed. To know which version you have defined as default, simply put in the terminal python or py and you will be initiated by the interpreter where you can see the version.

To specify it, just call the corresponding interpreter and use pip as any module next to the use of Python Launcher on Windows platforms:

py -3.6 -m pip install simpy Install SimPy in Python 3.6
py -3.5 -m pip install simpy Install SimPy in Python 3.5
py -2.7 -m pip install simpy Install SimPy in Python 2.7

It is always advisable to launch pip as a module ( -m ) even if you only have one installed version of Python.

    
answered by 22.03.2017 / 20:39
source