Closed DA-fromindia closed 4 years ago
I need a little more context than that. Did you install via pip? Which OS and which python version are you using? Did the error happen when using the command-line tool or in a script you wrote?
I solved the error by manually changing a path! I am using Windows, Python3.7 and error was happened in Pycharm!!
Great to hear that you were able to solve the issue 👍
I'm in windows and have the same issue, how did you solve it?
@bjajoh If you are using pycharm as well, the problem might be due to a path conflict from using conda+pip. With pycharm installing via the IDE's virtual environment (e.g. using a Pipfile) might solve this. Since I don't use pycharm, this is just a guess, however.
@patlevin I'm not using pycharmjust plain vscode a text editor. Might this be a general windows issue?
@bjajoh The issue might be that the debugger doesn't honour the conda environment and uses \Anaconda3\python.exe
as interpreter instead of \Anaconda3\{YOUR-ENV}\python.exe
.
This can be changed by opening the settings.json
in the workspace folder and replacing python.pythonPath
with the interpreter of your conda environment.
Alternatively you can set the python.venvPath
in your vscode user settings to ~\Anaconda3\envs
, which will allow you to select the correct Python virtual environment directly from the UI (which is what I did and thus never had this problem).
@bjajoh It just occurred to me that you might have a different issue entirely. "api" is not a sub-package within the "tfjs_graph_converter"-module. This means you cannot import it like so:
import tfjs_graph_converter as t
t.api.load_graph_model(...) # <- this won't work!
The correct usage would be
import tfjs_graph_converter.api as api
# from tfjs_graph_converter import api <- this also works as intended
api.load_graph_model(...)
@bjajoh It just occurred to me that you might have a different issue entirely. "api" is not a sub-package within the "tfjs_graph_converter"-module. This means you cannot import it like so:
import tfjs_graph_converter as t t.api.load_graph_model(...) # <- this won't work!
The correct usage would be
import tfjs_graph_converter.api as api # from tfjs_graph_converter import api <- this also works as intended api.load_graph_model(...)
This is what i did! and solved that error!!
@bjajoh alternatively, i found one more solution , i was using posenet that time, so i change their "IMPORT" in a proper way!
I decided to treat this issue as a bug and will fix this in the next version.
Thanks!
why package is not able to get this file??