Python Forum
how to import a module which is installed to personal folder using pip install --pre?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to import a module which is installed to personal folder using pip install --pre?
#1
I know there are multiple ways to install a python module. My question is related to the following installation:

pip3 install exchangelib --prefix /my/own/path1

the installation is good. But not sure how to make the "import exchangelib" work. Tried with sys.path.append and set the PYTHONPATH environment variable. These two methods are good for the module installed with "pip install exchangelib --target /my/own/path2"

Do we know what the difference among those two installations?

Thanks.

I forgot to mentioned that python3.7.6 is used.
Reply
#2
don't try to install to a personal folder, it will cause you problems next time you update python
rather, use virtual environment with pyenv
See https://python-forum.io/Thread-pyenv-Sim...Management
Reply
#3
Thanks for the info. I will use the venv then.

Just for my knowledge - what is the right way to import a module which was installed by 'pip3 install prefix /my/own/path1' ?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  personal module Azdaghost 3 956 Mar-30-2025, 08:40 PM
Last Post: deanhystad
  Install a module to a specific to Python Installation (one of many)) tester_V 2 2,468 Oct-29-2024, 03:25 PM
Last Post: snippsat
  Module not found error even though installed NZGeorge 1 5,364 Jul-10-2024, 09:08 AM
Last Post: Larz60+
  SOLVED: Install mailer module in Python 3.11.2? Calab 3 2,445 Jul-03-2024, 02:03 PM
Last Post: Calab
  Compare folder A and subfolder B and display files that are in folder A but not in su Melcu54 3 1,575 Jan-05-2024, 05:16 PM
Last Post: Pedroski55
  is import cointegration_analysis a recognized module mitcht33 1 1,199 Nov-06-2023, 09:29 PM
Last Post: deanhystad
  problem in import module from other folder akbarza 5 11,425 Sep-01-2023, 07:48 AM
Last Post: Gribouillis
  can not import anaconda pandas module. PySpark pandas module is imported!! aupres 0 1,432 Aug-06-2023, 01:09 AM
Last Post: aupres
  import module error tantony 5 5,159 Dec-15-2022, 01:55 PM
Last Post: Lauraburmrs
  Import a module one step back of the path prathampatel9 1 1,954 Sep-21-2022, 01:34 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020