YouCompleteMe does not complete the numpy and scipy namespaces.
Pandas and matplotlib, however, do work.
Works fine for me. It's probably an issue with your python path. Do you use multiple versions of python or virtualenvs?
As @RyanPineo said, if you have multiple Python installations on your system (e.g. one from OS X and one from MacPorts, or one from the system package manager and one from Anaconda), it may be that the configuration for the interpreter that YCM is using can't see all the installed packages (e.g. the Python from OS X might see the packages installed with pip but not those installed via the MacPorts port command).
A solution might be to set the g:ycm_path_to_python_interpreter variable. In my case, pointing it to the MacPorts Python (instead of the OS X system Python) fixed an issue like this one because I had installed pandas and matplotlib with pip but numpy and scipy with MacPorts:
let g:ycm_path_to_python_interpreter='/opt/local/bin/python'
I have one python interpreter, but packages are installed in
both/usr/lib/python2.7/dist-packages and
/usr/local/lib/python2.7/dist-packages
On Apr 30, 2014 12:40 PM, "Matthew Johnson" [email protected]
wrote:
As @RyanPineo https://github.com/RyanPineo said, if you have multiple
Python installations on your system (e.g. one from OS X and one from
MacPorts, or one from the system package manager and one from Anaconda), it
may be that the configuration for the interpreter that YCM is using can't
see all the installed packages (e.g. the Python from OS X might see the
packages installed with pip but not those installed via the MacPorts port
command).A solution might be to set the g:ycm_path_to_python_interpreter variable.
In my case, pointing it to the MacPorts Python (instead of the OS X system
Python) fixed an issue like this one because I had installed pandas and
matplotlib with pip but numpy and scipy with MacPorts:let g:ycm_path_to_python_interpreter='/opt/local/bin/python'
—
Reply to this email directly or view it on GitHubhttps://github.com/Valloric/YouCompleteMe/issues/947#issuecomment-41786880
.
Sounds like a configuration or Jedi issue, not YCM.
Most helpful comment
As @RyanPineo said, if you have multiple Python installations on your system (e.g. one from OS X and one from MacPorts, or one from the system package manager and one from Anaconda), it may be that the configuration for the interpreter that YCM is using can't see all the installed packages (e.g. the Python from OS X might see the packages installed with pip but not those installed via the MacPorts port command).
A solution might be to set the
g:ycm_path_to_python_interpretervariable. In my case, pointing it to the MacPorts Python (instead of the OS X system Python) fixed an issue like this one because I had installed pandas and matplotlib with pip but numpy and scipy with MacPorts: