dictation-toolbox / natlink

Natlink provides the interface between Dragon and python
Other
25 stars 17 forks source link

Python for all users weirdness with pip #117

Closed dougransom closed 2 years ago

dougransom commented 2 years ago

If Python is installed for all users, pip installs packages to platformlib if and only if pip running with admin privileges.

i.e.

PS C:\Users\Doug\OneDrive\doug\dication_toolbox\natlink_merge\natlink\src\natlinkcore> pye_platlib.exe C:\Program Files (x86)\Python39-32\Lib\site-packages PS C:\Users\Doug\OneDrive\doug\dication_toolbox\natlink_merge\natlink\src\natlinkcore> If pip is running with user privilege's, packages like unimacro are installed to C:\Users\Doug\AppData\Roaming\Python\Python39\site-packages\

Users who install Python for all users must be aware of this and configure natlink accordingly.

dougransom commented 2 years ago

A possible solution is to something like this when an install folder is required:

`>>> import unimacro as u

u <module 'unimacro' from 'C:\Users\Doug\AppData\Roaming\Python\Python39\site-packages\unimacro\init.py'> u.file 'C:\Users\Doug\AppData\Roaming\Python\Python39\site-packages\unimacro\init.py'

`

quintijn commented 2 years ago

This is a pity. It means, that if we want to upgrade python packages, it should always be done in an elevated natlinkconfig...

LexiconCode commented 2 years ago

done in https://github.com/dictation-toolbox/natlink/pull/121