Skip to content
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

Open
quintijn opened this issue Aug 22, 2024 · 3 comments
Open

still elevation problems with pipping packages... #207

quintijn opened this issue Aug 22, 2024 · 3 comments
Assignees

Comments

@quintijn
Copy link
Contributor

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

@quintijn quintijn self-assigned this Aug 22, 2024
@quintijn
Copy link
Contributor Author

site-packages Python321-32
site-packages appdata roaming etc
site-packages Natlink

the 3 places where site-packages are. Probably 2 of them elevated.

@drmfinlay
Copy link
Member

Goodness! This is confusing me, too. It was a lot simpler when everything was under C:\Natlink.

@LexiconCode
Copy link
Member

LexiconCode commented Sep 3, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants