Use WinPython distribution in Eclipse + Pydev?

I used python in Eclipse + Pydev for about a month. (32-bit version 7) I recently installed WinPython ( https://code.google.com/p/winpython/ ) because I wanted several interdependent packages for data analysis, and it was an easy solution for Python 3.

Winpython is good in the sense that it does not change the system settings - it is self-sufficient and can be run from an external drive. It also has a built-in Spyder ID environment, but I'm still not sure if this is the IDE I want to use.

Can someone explain how I can point Eclipse / Pydev to a Winpython distribution without registering the WinPython distribution using the WinPython control panel?

By the way: I think WinPython would be the right tag for this, but it does not exist, and I don't have a rep to create it ...

Thanks!

DETAILED RESPONSE UPDATE

Without an engine (in the comments below) I figured this out. This is how I got WinPython running on Eclipse + PyDev on 32-bit Windows 7. It is assumed that before that you are already using PyDev with a standard Python distribution. It also assumes that you are not β€œregistering” the WinPython distribution using the WinPython control panel. This probably allows AutoConfig to work in PyDev, but I didn’t.

This turns out to be pretty easy, but I describe in detail to help other people like me:

1) Find the path to the place where you extracted WinPython. For me it was in: C: \ WinPython-32bit-3.3.2.1

2) Find the python exe located in the WinPython distribution. For me it was: C: \ WinPython-32bit-3.3.2.1 \ python-3.3.2 \ python.exe (NOT pythonw.exe or any other EXE file in this directory)

3) Launch Eclipse + Pydev and go to where the interpreter is defined: Window β†’ Settings β†’ PyDev β†’ Interpreter - Python

4) Select "Create ..." in the "Python Translators" section in the top pane of the window. Indicate that I DO NOT USE THE AUTOMATIC CONFIGURED TO TAKE HERE.

5) In the pop-up window, specify any name you want (I used winpython, but I probably should have called it winpython3d3 or something else when I install another version). Then select "Browse ..." and go to the python.exe file from step 2 above, select it and click "OK."

6) Select a new interpreter in the upper pane of the Python Interpreters window, click "Up" to move it to the top of the list of interpreters that you have defined. (I think that will make it default for new projects.)

7) At the bottom of the Python Interpreters window (while the new interpreter is still highlighted in the top pane), click Apply. If all goes well, pointers to all WinPython libraries are displayed in the System PYTHONPATH panel at the bottom. It took a lot of seconds.

8) Click OK to close the Python Interpreters window.

9) Make sure you are in the PyDev perspective (Ctrl-F8 before highlighting PyDev OR Window β†’ Navigation β†’ Next perspective and click on PyDev)

10) Right-click on your project, select "Properties", then select "PyDev - Translator / Grammar". Make sure the new python interpreter (starting from step 5 above) is selected in the Interpreter field. (I also chose Python as the project type and Grammar Version as 3.0, since I used Python 3.3)

11) Select OK. At this point, at the bottom of the Package Explorer, you should see a folder with the name you gave the python interpreter. If you expand this folder, you should see the paths defined by the pyDev python interpreter. In particular, I confirmed that I was compiling the necessary libraries by detecting matplotlib when I expanded this folder in PyDev Package Explorer: InterpreterName β†’ System Libs β†’ lib / site-packages β†’ matplotlib

12) Right-click on your project and select "Update"

13) CLOSE AND COMPLETE COMPLETION! Nothing worked until I restarted.

Hope this helps someone.

+4
source share
1 answer

Make sure you install winpython in the same python version as eclipse / pydev. Then go to window->preferences->pydev->Interpreter python . Then click "Apply." If this does not work, manually load the module through the same interface. Now do the same for your project, make sure that the project has the correct interpreter. Then restart eclipse and finally try to import the module.

+2
source

Source: https://habr.com/ru/post/1499870/


All Articles