I'm using Visual Studio Code. Recently tried out Kite. Both of which doesn't seem to have autocomplete for pytorch.
Is is possible with these tools ? If not, can someone suggest an editor that does ?
Thank you!
Use Pycharm https://www.jetbrains.com/pycharm/
Get Community version, because it is free with debugger and autocomplete. (more than enough for student)
To get autocomplete and run/debug the code on Pycharm IDE, you have to set correct project interpreter path to your environment (or virtual environment) which you install pytorch
The screenshot shows that I set Project Interpreter path to conda environment named 'pytorch', which I install Pytorch.
Spyder does autocomplete for PyTorch as well
Both Spyder and PyCharm have auto-complete feature for the installed libraries. But this feature does not seem to work for the local project files (functions, classes, variables defined in the local files even if they are imported).
They also have "go to definition" and "help", but again, only for the installed libraries.
I hope these features will be included soon, in addition to "references to this variable/function/class", which is available in advanced IDEs and is quite useful.
Related
I cannot find the answer to this, and I have looked quite a bit. I used the python distribution, anaconda, to install opencv for use in my python applications using the instructions on this web site,
https://rivercitylabs.org/up-and-running-with-opencv3-and-python-3-anaconda-edition/
It is very easy, it works great, and opencv is available in my python applications. I have only one problem, and it is in the nature of an annoyance: eclipse and pydev cannot see that cv2 is available, and they give the little red underline on the import cv2 statement, and claim this is an "unresolved import". I repeat, cv2 works when I run my python applications, no problem. It is just not being seen by eclipse and pydev.
I looked in the anaconda env directory where opencv is installed, and found in the lib/python3.6/site-packages directory this file:
cv2.cpython-36m-x86_64-linux-gnu.so
This folder, /anaconda-env-folder/lib/python3.6/site-packages, is of course listed on the python path for the anaconda virtual env in eclipse. Nothing would work without it. But everything else in this folder is a py file. This one is an so. Is that the problem? Eclipse and pydev cannot see this type of file, and therefore cannot give it credit for being importable? Even though python can import it?
I tried adding the directory as an external library, and I tried starting eclipse with this directory in the LD_LIBRARY_PATH, as per:
Eclipse with $LD_LIBRARY_PATH
It is still an "unresolved import".
Is there a way to fix this?
Thanks for any help!
Take a look at my answer, especially at Eclipse tutorial image.
Installing opencv on Windows 10 with python 3.6 and anaconda 3.6
Even if Windows 10, it should work also on Linux...
Also, try use cv2.cv2 syntax and see what happens..
I have downloaded .tar.gz install file for C/C++ eclipse IDE.
Can it also be used for java or do I need additional ?
Yes it is, you should install the right plugin - JDT (look at Help->Install new Software)
Base on wiki link:
In computer programming, Eclipse is an integrated development
environment (IDE). It contains a base workspace and an extensible
plug-in system for customizing the environment.
That means Eclipse is just a platform, and you can install any plugins for eclipse. On Eclipse site, you see some packages such as Eclipse CDT Eclipse JDT ... Because they just want you to have a convenient environment for working: just download and run. You can download any versions, and install enough other plugins and they will works well. Here is some tutorials: official link and another nice link
But my recommendation is:
you don't know how "enough" is (as newbie). So the result will be hard because you don't choose enough packages for supporting your languages. And Eclipse Foundation has made it for you.
You shouldn't use many languages in same Eclipse distribution (although you can switch to other workspace easily). Many languages mean many installed packages, and this will slow down your eclipse so much because eclipse must loads more plugins into memory, loads more projects ... This is my experience. So, each language, each eclipse distribution, each workspace. That's a trick.
And answering directly to your question:YES. You can use that version for programming java, but will need to install JDT (Java Development Toolkit) plugin.
Hope this help :)
I'm trying to integrate the pydev, pyqt, python and eclipse.
Now the code can be runing without error.
And I know to make the GUI in Qt Designer.
and then modified it in Eclipse.
Now I want to integrate the Qt Designer of PyQt to Eclipse.
Just like the Qt Eclipse Integration for C++.
Use PyQt Designer in Eclipse.
Can anybody teach me how to do it?
Thanks very much!
BTW, I'm try to set the preference of qt project in Eclipse.
But when I add new qt version.I didn't know how to borrow the bin path.
Because there is no bin path in PyQt.And also didn't have qmake,uic,rcc etc.
the version name that I typed is PyQt-Py2.7-x64-gpl-4.8.5-1.exe.
I borrow the include path like C:\python27\Lib\site-packages\PyQt4\Sib\PyQt4.
my OS is win7.
Thanks for your answers!
God bless you!
The only way is to install the Qt Eclipse Integration, that way you can open ui files directly in eclipse.
But this does not work well with plugins and custom widgets, since that requires the exact same Qt version for the Eclipse integration and PyQt (and the same compiler flags..), and that may not be the case.
You could of course build the Qt Eclipse Integration yourself, if it works with the Qt version you're using with PyQt. (it's pre-built for 4.6.1, so it may or may not work with later Qt versions.)
What we've done is to tell Eclipse to open .ui files in Qt Designer outside of Eclipse. Not as nice, but it works with custom widget plugins, so it's a definite win for us.
An easy way to open .ui files generated by Designer is to convert them to python code using "pyuic4" which comes with pyqt. On Windows and Linux (I haven't tested on Mac), open a shell and navigate to the directory containing your .ui file then run the command/flag/args... See example below:
pyuic4 -o newOutputFile.py theOriginalPyQtFile.ui
In the example my input file is called "theOriginalPyQtFile.ui" and the ouput file that will be generated is named "newOutputFile.py" and saved in the same directory as "theOriginalPyQtFile.ui".
After that just open "newOutputFile.py" in Eclipse or any IDE.
I have installed Eclipse (Helios) for the Java programming language, but I also want to use it for programming in C/C++, Python and Ruby. I've installed CDT and DLTK (for Python and Ruby).
I already had mingw-w64 (Windows platform) installed. How do I set up Eclipse so that it uses MinGW as the toolchain? It apparently detects MinGW as a toolchain, but when I create a project, two warnings already appear saying "error launching external scanner info generator". I'm assuming this is because it can't find the compiler program. Also, it doesn't detect any of the standard-library header files. Could these problems be because I'm using mingw-w64 rather than the standard MinGW?
I have Ruby working, but as for Python, it cannot find the interpreter nor the default system library. I have Python 2.7 already installed. I don't know how to tell Eclipse where to look for the files.
Note: I am on Windows 7 Professional 64-bit. I've heard of people on 64-bit versions of Vista having trouble getting mingw-w64 to work. I may be having the same problem. Ignoring Eclipse, when I try to compile a C file using gcc, it has trouble finding the libraries and includes.
Edit: If I set the path to /bin/ and /libexec/ via environmental variables, I don't get the initial errors when creating a project, but, what I want to know is, how could I set the paths via Eclipse? Also, even if I set the paths, the linker still can't find the libraries and includes. I went to Project > Properties > C/C++ Build > Settings and tried to set the libraries and includes that way, but it still couldn't find them (the libraries, at least)! Moreover, would I really have to do this for every project? This option isn't available in Window > Preferences.
As for the python part, I recommend using pydev: http://pydev.org/
It's the best eclipse plugin for python. From code completion, syntax highlighting, virtualenv support (http://pydev.blogspot.com/2010/04/pydev-and-virtualenv.html) and so on...
If you are into web development,
from javascript, php, html, python, ruby... you also might want to take a look at aptana.
http://www.aptana.com/
It's a eclipse based IDE with lots of goodies working out of thebox, like git and subversion plugins, pydev etc... aptana is (or was, I switched IDE) installable as a plugin in a regular eclipse)
Martin K. link looks good for mingw part.
Is there any way to manually create fold points in code in Eclipse? I know how to enable folding and how to set the auto preferences, but i like being able to set my own fold points so I can ignore certain parts of my code. Think regions in VS.
I know there is in VS and NetBeans, but I cannot find a way to set manual fold points in Eclipse.
I don't think Eclipse has built in manual folding, but I did use a previous version of the following plugin for it.
Per the comment: The plugin has been recompiled for Eclipse 3.5 and is available at the Apache Isis site. A direct download link is also available. It also appears to work for Eclipse 3.6.
The coffee bytes folding plug-in for eclipse is still alive. But the pages have moved.
An Overview and how to get it can be found here.
I've installed it in eclipse using the update page.
In Eclipse go to Help -> Install new Software
Enter: eclipse.realjenius.com/update-site
Select the plugin and follow on-screen instruction.
I'm still pretty new to eclipse development and had to install mylyn before installing the code folding plugin.
I'm new to Eclipse, but since the IDE lets you fold preprocessor directives, you can just do "#if 1 .... #endif" to effectively set up manual folding.
No, eclipse does not have any option to provide manual folding plugins.