Comments (12)
It seems you have multiple python installed on your machine. And the extension in vscode extension shop hasn't be updated for a while.
from ffi-navigator.
It would be great if you can get a repro, see some of the testcases here https://github.com/tqchen/ffi-navigator/blob/master/tests/python/test_langserver.py
through a dummy repo location and desired target. The current version seems work fine on my side
from ffi-navigator.
cc @comaniac
from ffi-navigator.
The current version (extension on marketplace and the python package on PyPI) works for me on Linux and OSX.
-
Sorry for the typo. It has been fixed in upstream but not yet updated on marketplace (@tqchen should we setup a Github action workflow or similar mechanism to upload a new version automatically?)
-
As @VoVAllen mentioned, please make sure the ffi_navigator package is installed for the python you are using in VSCode. If everything works fine, you should not see the warning like "No definition found ...". Even the language server doesn't work as expected, you should just see an empty definition list shown in VSCode extension log tab instead of a popping up widget.
from ffi-navigator.
Updated the vscode extension
from ffi-navigator.
@fleebeatles please update the vscode extension to the lastest 0.6.1 and try again
from ffi-navigator.
Thanks all for your reply.
I updated the vscode extension and it still wouldn't work. And I tried the testcase you @tqchen posted and it worked fine. FYI, the configurations of my working enviroment is as follows.
- The system is macos 10.14.6.
- Yes @VoVAllen I am using conda to manage the virtual env of Python and I installed ffi_navigator on both
base
env andtvm
env (and even the system's default python env). The dependency packages of TVM are installed intvm
env using "conda" or "pip". However, vscode notifies that "ffi_navigator is not installed..." as before. - In vscode, the Python interpreter is directed to the Python path of
tvm
env.
Besides, I found that not only the Python and C++ codes couldn't jump to the other part, but the defination of the references to tvm or vta packages couldn't be found either, as shown below. However, the TVM Python code indeed runs properly.
Appreciate it if someone give advice.
from ffi-navigator.
Did you choose the right python interpreter at the bottom bar?
from ffi-navigator.
And the configuration path for ffi navigator is
{
"ffi_navigator.pythonpath": "<your-python-path>"
}
from ffi-navigator.
I think so @VoVAllen. Please check the followed.
from ffi-navigator.
If your VSCode cannot find tvm, it is nothing to do with ffi_navigator. This is because the PYTHONPATH
VSCode is using does not come from your environment. The most promising way I am using is creating a file <your-tvm-path>/.env
with the following:
PYTHONPATH=<your-tvm-path>/python:<your-tvm-path>/topi/python
To make this file effective, you have to either open VSCode directly in <your-tvm-path>
, or open VSCode first and File->Open-><your-tvm-path>
.
from ffi-navigator.
@VoVAllen Setting the right path of python interpreter for ffi-navigator works! Thanks a lot.
@comaniac You are right and thank you very much.
And want to say sorry to everyone concerned with this issue, because the README of ffi-navigator has explained how to solve this problem and I didn't read it.
from ffi-navigator.
Related Issues (10)
- Error when URI Contains Encoded Characters
- "FileNotFoundError" when use vscode in windows HOT 7
- Error: The connected server(s) does not support method textDocument/definition. HOT 1
- Server initialization failed HOT 3
- Migrate to pyright from pyls?
- TypeError: startswith first arg must be str or a tuple of str, not NoneType HOT 5
- UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 4622: ordinal not in range(128) HOT 6
- Any plan to make this package PyPi available? HOT 2
- TypeError
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ffi-navigator.