Skip to content

How to let AREPL detect libraries installed with PDM #419

Answered by Almenon
jamestansx asked this question in Q&A
Discussion options

You must be logged in to vote

Oh god there's another python package management tool? 😱 Python really needs to settle on one of them.

Anyways, unfortunately AREPL doesn't have a setting to recognize the __pypackage__ folder automatically. You can manually specify it with the following code:

import sys
import os
sys.path.insert(0,os.path.abspath('__pypackages__\\3.8-32\\lib'))

Replace 3.8-32 with your python version. If you're on a mac/linux OS use / instead of \\

You can test if it works like so:

import sys
import os
sys.path.insert(0,os.path.abspath('__pypackages__\\3.8-32\\lib'))

import <yourLibrary>
print(<yourLibrary>.__version__) # the version number should match the one installed in pdm

If you want to you can d…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jamestansx
Comment options

Answer selected by Almenon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants