Python3: another user doesn't see the library

Question:

I have 2 windows system users:

  • user1
  • user2

When running in Python3 the script:

import pandas

Module is imported successfully – under user1

Module is not found – under user2

Location of the library is

pandas.__file__
>>> 'C:\Users\user1\AppData\Roaming\Python\Python310\site-packages\pandas\__init__.py'

How to make the user2 to see pandas library?
It is possible to install library from user2. But pandas – is not the only library and it will take much time.

I’ve heard something about environment path, but didn’t work with this.
Would you advise me the first steps to solve the problem.

Thank you.

Asked By: Alex Ivanov

||

Answers:

I suggest you use a virtual environment, and then just call env/scripts/activate.bat

install your librarys

then call your python script in there.

Answered By: Dean Van Greunen
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.