-
Notifications
You must be signed in to change notification settings - Fork 17
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
still elevation problems with pipping packages... #207
Comments
Goodness! This is confusing me, too. It was a lot simpler when everything was under C:\Natlink. |
And this goes back to a previously documented issue when Pip is invoked as a standard user versus elevated privileges. pip should never be executed as administrator. The end user never installs packages as admin nor should they. Installer runs as administrator and it has to, for in-process. I'm not sure how to downgrade pip install when the installer executes pip if python is installed as a user. Why not install as 'pip install --user'? because if you log in a different user, you'll be missing packages. If python is installed as a user then the pyd will error appear when other users use Dragon without natlink. There's a lot of problems with everything installed globall and Python user install isn't perfect for in-process either. Additionally PIP randomly decides sometimes to include dependencies in various places. This is really what started my journey working towards virtual installs. Out of process only seems to be the way to go. |
These are the two valid install scenarios I think we should support. Install for all users:
Install for current user (note this can't be done for more than one user):
For all user installs:
For current user:
We could say for all user installs:
or we could say if you install natlink for all users, you must run pip elevated to install or upgrade all packages. Unimacro, vocola, any third party python packages. If you don't you are going to have problems. |
some experiements on registering natlink per user I was able to register _natlink_core.pyd for a per user basis, and it was able to create a natlink object using a test program. Unfortunately, natlink crashes in this situation. I will have to wait till I have a little more time and energy to put into this before I investigate further. All i did was register with this after replacing %MODULE% by editing the file.
|
I think, we need to do all pip installs elevated, or none (after natlink itself).
part of messages window just now:
`Natlink Version: 5.5.7
Natlink pyd path: C:\Program Files (x86)\Natlink\site-packages\natlink_natlink_core.pyd
Python Version: 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:20:04) [MSC v.1929 32 bit (Intel)]
Natlink is loaded...
Starting natlink loader from config file:
"C:\Users\Gebruiker.natlink\natlink.ini"
loading module: _sample1
loading module: init
loading module: _vocola_main
VocolaEnabled: True
Traceback (most recent call last):
File "C:\DT\NatlinkcoreDoug\src\natlinkcore\loader.py", line 332, in load_or_reload_module
module = self._import_module_from_path(mod_path)
(...)
File "C:\Program Files (x86)\Python310-32\lib\site-packages\vocola2_vocola_main.py", line 96, in
os.mkdir(VocolaGrammarsDirectory)
FileNotFoundError: [WinError 3] The system cannot find the path specified: ''
Traceback (most recent call last):
File "C:\DT\NatlinkcoreDoug\src\natlinkcore\loader.py", line 332, in load_or_reload_module
module = self._import_module_from_path(mod_path)
File "C:\DT\NatlinkcoreDoug\src\natlinkcore\loader.py", line 287, in _import_module_from_path
loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "C:\Program Files (x86)\Python310-32\lib\site-packages\vocola2_vocola_main.py", line 96, in
os.mkdir(VocolaGrammarsDirectory)
FileNotFoundError: [WinError 3] The system cannot find the path specified: ''
`
Unimacro is locally pipped, so focus this issue on Vocola.
I have Python 3.10.11 (32 bit) installed on
C:\Program Files (x86)\Python310-32\Lib\site-packages
, with vocola2 installed there.Also
C:\Program Files (x86)\Natlink\site-packages
with natlink and other things (no vocola2 or unimacro).Then, from an unelevated configure session: C:\Users\Gebruiker\AppData\Roaming\Python\Python310-32\site-packages a bunch of modules, but NOT unimacro or vocola2.
Before I had vocola2 just running on this computer...
So I am confused.
I put it here for not forgetting about it, will try a few more things first. Quintijn
The text was updated successfully, but these errors were encountered: