0

I'm running the latest version of IntelliJ IDEA Community Edition and have Python 3.7 downloaded and installed. The trouble is, my console with IntelliJ is only running Python 2.7. I've tried installing/uninstalling/updating installation but the only Plug-in option with IntelliJ is Community Edition and this seems to be Python 2 .. anyway. How am I able to load Python plug-in (if there is one) for IntelliJ? I'm not able to import Pandas as a result and can't work through code ..

Don't want to go through the route of copying and pasting modules from 3.7 to 2 if I don't need to or if it's going down a bad road so to speak.

I've tried installing/uninstalling/updating installation but the only Plug-in option with IntelliJ is Community Edition and this seems to be Python 2 .. anyway. How am I able to load Python plug-in (if there is one) for IntelliJ? I'm not able to import Pandas as a result and can't work through code ..

As described above .. can't load the plug-in

error: module not found

DanzoLion
  • 3
  • 1
  • 4
  • Why don't you use [PyCharm](https://www.jetbrains.com/pycharm/) it is also from Jetbrains and the perfect IDE for Python – Uli Sotschok Aug 20 '19 at 08:43
  • Hi thanks for this .. yes, I've abandoned IntelliJ as it appears to be more suited for Java .. I don't really run Java, initially I had the same problem when running PyCharm but I think uninstalling Pandas from all PC profiles are re-installing worked. However, I need to import Pandas directly from the PyCharm console and then run my scrip that will work. It's not 100% but it's 90% so all-in-all a workable solution. Took me many hours to get this workaround. – DanzoLion Aug 21 '19 at 08:01
  • This all seems like your environmnet is not correctly Setup. In PyCharm you can go to File -> Settings and search for 'interpreter'. You can then choose the Installation path ov your python Version. Then you can install python packages in this Environment when you click on the '+' where all the packages are listed (also in the Settings). When you install a package from the console you have to ensure that you work with the correct Interpreter, when you have multiple installed. Check with 'python -V'. If you Need more help on PyCharm feel free to ask – Uli Sotschok Aug 21 '19 at 08:26
  • Some usefull links: [Edit Interpreter in PyCharm](https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html), [multiple python versions on Windows](https://stackoverflow.com/questions/4583367/how-to-run-multiple-python-versions-on-windows), [multiple python versions in General](https://stackoverflow.com/questions/2547554/multiple-python-versions-on-the-same-machine) – Uli Sotschok Aug 21 '19 at 08:32
  • Hi Uli - yes it gets messy under the bonnet ;) – DanzoLion Aug 21 '19 at 09:41
  • I'll double check this tonight and post-it. I do have PyCharm running with Python in the console .. it might be okay but I'll check again and let you know this evening. Do appreciate the help. Again, IntelliJ worked fine until i needed to use Pandas then everything went haywire. I'll stick with PyCharm and it should run better. Certainly, I've got Pandas running, but whether I'm running the correct interpreter I don't know. – DanzoLion Aug 21 '19 at 09:43
  • Hi Uli ..I'm running Python 3.7 – DanzoLion Aug 21 '19 at 18:54
  • Anaconda3\envs - and everything seems to be working okay for now. If we use Available Packabges and view the list, this is obviously a list for installable development packages we can use? – DanzoLion Aug 21 '19 at 18:56
  • Python has many packages installed by Default. for example tkinter, sqlite, .... This are the packages in the list. You can add more packages by clicking on the + sign. Then you can search for the package e.g. Pandas and install it. In PyCharm is nearly everything possile even Setting up an anaconda Environment. I would suggest look after this. Tere are many tutorial outside about this – Uli Sotschok Aug 22 '19 at 06:41
  • Cheers Uli - I'll take it from here :) – DanzoLion Aug 22 '19 at 12:18

2 Answers2

1

Took me forever to find.. I have written the steps below :-

  • Close project
  • Configure
  • Structure for New Projects -> SDKs -> Packages
  • Click on Pygame -> Click install package Then at the end Create new project

Picture of where to find pygame.

bhucho
  • 3,903
  • 3
  • 16
  • 34
0

Please try these steps:

  1. Open "Project Structure | SDKs"
  2. Add new python SDK (choose"System Interpreter" and select installed Python 3 from the dropdpwn list)
  3. Open "Settings/Preferences | Build... | Console | Python Console" and select "Use specified interpreter"

After that "Tools | Python Console" will run with Python 3

y.bedrov
  • 5,318
  • 3
  • 22
  • 19
  • Hi many thanks. I've ended up abandoning IntelliJ and moved on to PyCharm. However, initially I had the same problem. I tried SDK settings installed/removed however nothing worked. I also tried deleting Python 2 and deleting Pandas .. and re-installing. However same problem. I think because I've been running two Profiles I needed to delete Pandas from both Profiles (Admin and own) and then re-install. This worked. At least I think this was the solution .. however I need to load Pandas directly from the console before any code will run in Python file. So I'm running PyCharm now .. – DanzoLion Aug 21 '19 at 07:59
  • Hi yes, thanks for the assistance. The interpreter seemed to be the issue, however I've learned from this experience that PyCharm is probably the way to go with Python build. Have a great day! – DanzoLion Aug 21 '19 at 19:41