-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python path for menuconfig.py (IDFGH-4417) #6248
Comments
Hi @masterxq. Your issue makes me wonder if you are in the environment set by
Your path should be something like this Have you run |
Hello @danicampora, |
In my opinion, installing packages into a virtual environment for one purpose is much clearer than to install them globally and manage compatibility between all your Python applications. Please note that
There are big differences between working in a virtual Python environment. The path-related functions work differently, or some of them are not available. I don't particularly like the idea of looking into all PATH directories because we might find a false positive match (or incompatible version). I'm willing to apply a patch if that is not breaking the supported way of working with ESP-IDF. But currently I don't see how it would possible without putting a bunch of
Are you using a different IDE from those we are supporting? We have plugins for Eclipse and Vscode. In other cases, you could run |
Hi again, I have some workstations where many users programming and using the espressif-idf. There i prefer to install libraries we are using into an global path for having less maintain task per user and ofc same level of software. I see your point but this is the only place where this workflow will break. As i think multiply user are doing the same way as i do, even if its not the best practice in every situation, I hope you will support other ways of handle the espressif too. So that i and others don't need to handle with custom patches all the way. My suggestion is:
This would keep the wanted way in every situation where it is possible and allow users who want to go another way to do it without writing patches^^ My argumentation is: The default user will always use the install and export script. Users who don't want to use this are mostly able to maintain there systems on there own... Using KDevelop and there is a shell but never tested if the shell is using same environment as the the IDE. But there are special environments you can use for this functionality. What i do and what always worked well in the past, and still does because i not run menuconfig in the IDE (just building and debug). It's an excellent IDE that i want continue to use :) Regards |
Hi @masterxq. I've got an idea. Does the following patch work for you? - cmd += [os.path.join(get_python_lib(), 'menuconfig.py')]
+ cmd += ['-m', 'menuconfig'] |
Really nice solution. It's working perfectly! Thanks for your effort! |
Great! I'll submit a fix. |
Hi,
I'm using Debian buster with python 3.8.4. And i have trouble with the path of menuconfig.py lib.
The file:
esp-idf/tools/kconfig_new/menuconfig.py
Wants to call the menuconfig.py from the python kconfig lib. (Talking about two different files with same name here...)
This code:
esp-idf/tools/kconfig_new/menuconfig.py
Line 33 in 178b122
gives me the path:
/usr/lib/python3.8/menuconfig.py
And this is wrong in my case!
It should be:
/home/user/.local/lib/python3.8/site-packages/menuconfig.py
Which also will be is in list of get_python_lib(). But there is no check if the file exists.
What I did for being able to use the master is:
Care! If you don't compare with file you will go into endless loop calling the same file :)
and calling:
cmd += [find_libfile('menuconfig.py')]
If the code is ok, you can use it. I'm not a Python programmer... But it works at least in my case...
The text was updated successfully, but these errors were encountered: