i'm using Elcipse+PyDev and Pyscripter sometimes for Python 2.7
Yesterday i installed PyTables from compiled binaries and :
import tables
h5f = tables.openFile(r'D:\sample.h5','w')
h5f.createGroup('/','Box')
h5f.
So, when I type "h5f." IDE don't show me all the methods, only a few!
Can't do anything with It, installed PyTables few times,same result...
Method h5f.CreateGroup() works perfectly, but IDE dont see it so don't display it in drop-down list! Eclipse and Python both behave same...
The thing with Pydev and Eclipse is that when you install a new package or library and if you want to use the auto-complete with it, you will have to recreate the system PYTHONPATH in eclipse.
For that go to: Window -> Preferences -> Pydev -> Interpreted Python and in the tab libraries, in System PYTHONPATH you will not see your new installed library because pydev just do a copy of the PYTHONPATH the first time that you have configured and now each time you installed a new package you will have to resynchronize pydev with the new PYTHONPATH.
So to resynchronize you will have to click on the button Apply so that eclipse export (again) all the library (between them your new installed one) from PYTHONPATH to eclipse.
So now eclipse should know your library and you should work with it just fine.
Hope this will help :)
Related
If I do something like "import selenium" (or any other kind of third party library) in a .py file and then run it from the terminal, it works just fine. But if I make a new file in PyCharm CE and do the same thing, it can't find the library / module.
How can I fix this or get it to point in the right location? I use a Macbook Pro.
You need to setup your project in PyCharm to use the Python interpreter that has your libraries:
Go to: file->settings->project->project interpreter
And select the appropriate interpreter from the dropdown. After selecting an interpreter, the window displays a list of libraries installed on that interpreter; this should further help you make the right selection.
I've faced a similar issue on Pop!_OS after installing PyCharm via Flatpak. I think the installation is somehow incomplete, as I've had these issues (among others):
Installer could not create the menu shortcut due to the lack of credentials. Unlike during a typical installation, it wouldn't ask for the password and instead I had to uncheck that option altogether.
Built-in terminal defaulted to sh. Even after changing to bash, it would not read my .bashrc and many commands were missing.
After changing the interpreter into a local virtualenv, it would just default to Python 3.7 (even though the version was actually 3.8) and it didn't see any of my installed libraries.
When I've tried to use a Docker Compose environment, IDE failed to detect Docker Compose installation.
I've eventually uninstalled PyCharm and downloaded it directly from Jetbrains website to make it work correctly.
I have installed Eclipse 3.7.2 from APT in Ubuntu 12.04, and installed PyDev in Eclipse. First, it warns unused import and unused wild import, but it no longer displays them today. However, it can display errors like missing parenthesis.
I created a new user, and installed PyDev using that user, problem still happens. How can I enable them for warnings? I have not change the code analysis settings.
list all operations could solve it here, for others convenience, and make this question closed
remove the project and recreated it, and this time the project dir is the the PYTHONPATH
remove your python interpretor settings, and set it again in eclipse - window preference - pydev -interpreter Python, refresh the pydev index
Project -> Properties -> PyDev -PYTHONPATH, all is empty. I then "add source folder"
I had the same problem. Went to project properties > pydev - PYTHONPATH, then setting the source folder did it for me !
I am trying to import the OpenGL.GL module.
Given the py file with that line, I can perform "python file.py" just fine, but I cannot run that same file when used in Aptana or Eclipse. Both IDEs have PyDev installed.
I do have PyOpenGL installed.
I wish to point out that I can still import other modules (PIL, numpy), which were installed the same way as the PyOpenGL. I am confident that there is only 1 python running on my MacOS.
I had the same problem after installing a different version of PyOpen and my Eclipse PyDev path is messed up. What I did was remove the interpreter link and re-added the old one which made PyDev to re-scan my libs. This seems to fix the problem. Don't forget for all your projects, you need to go to the property (Right click project->properties) and re-select the interpreter.
Maybe you need to reconfigure your interpreter.
If you installed PyOpenGL as an egg after pydev was set up your PYTHONPATH might be out of date.
Check out Preferences->PyDev->Interpreter - Python
Are you sure you don't have multiple versions of python? Seems to me like the interpreter that aptana uses is not the same as the one used from command line. You can look in:
Run -> Run configurations -> Python run -- then you have Interpreter tab
There you can click : See resulting command line. Than will get you the python that is used as well as the python path
I'm using PyScripter for writing python programs and I can't figure out how to make it work with Python26 on my computer. When I installed ArcGIS, by default it installs Python26. I then installed PyScripter which found that installation and it worked fine. Later, I installed Python27, and subsequently reinstalled PyScripter.Now Pyscripter uses Python27 and I don't know how to change it.
I've looked at the settings under Tools -> PythonPath and they are as follows:
and also Tools -> Configure Tools
I assume I need to change the python path entries, but what do I change them to? My Python26 installation is found in C:\Program Files (x86)\ArcGIS\Desktop10.0\Bin.
If you go to the pyScripter folder in the start menu, it will have a version of pyScripter for Python 2.4 to 3.2. Just run the one corresponding to your Python version.
go to the pyscripter shortcut : right click then select Properties,
add the option to the target : --PYTHONXX
wherein XX the Python version.
ex : "C:\Program Files\PyScripter\PyScripter.exe" --PYTHON24
Copy/paste another shortcut and modify the option to another python version.
Easiest way to change the python version in PyScripter is:
Run->Python Version-> Setup Python Versions->Add New Python Version->
Browse to your python exe and select ok.-> Click on Activate Selected Python Version..
Now restart your PyScriptor and your are good to go.
I've been browsing documentation, but haven't been able to find a straightforward tutorial, so I apologize if this is a really simple question.
Anyway, I have eclipse with pydev installed on MAC OSX, and I want configure wxPython to work with eclipse, how do I do this? Once I've downloaded wxpython, what steps do I take to allow wxPython development from eclipse?
Thanks!
Vinay's answer above is correct. However, if code completion is not picking it up, you might need to add the WX directory to the Pydev's interpreter library path.
Window | Preferences | Pydev |
Interpreter - Python | Libraries
If wx is not present, New Folder and select the install directory.
You don't need to do anything special. I'm on Ubuntu rather than Mac, and I've installed wxPython, so that
python -c "import wx"
works at a shell prompt. Then, just fire up Eclipse and create a PyDev project, do import wx in your code and start using the wxPython API. You should get method completion etc. working as you edit your code, and you can also use the debugger and set breakpoints etc.
wxPython install by default to the following path /usr/local/lib/wxPython-2.9.4.0
When adding a path to the Interpreter libraries section in the eclipse preferences add this path:
/usr/local/lib/wxPython-2.9.4.0/lib/python2.7/site-packages/wx-2.9.4-osx_cocoa