"Unable to Locate Installed deepxde Library Folder in C:/Users/Username/"

I’m trying to use the deepxde library. I used pip install deepxde, and it downloaded successfully. However, when I go to the folder “C:/Users/Username/”, I can’t find the deepxde folder. Please, can anyone help me?

It should be in Python’s site-packages folder.

Don’t know where you got that particular expectation from. Installing a module with pip means that a future import of that module will work. Where the code physically went to is not part of the deal - yes, there are lots of details behind the scenes, but the basic idea is that once you’ve installed something, you can make use of it. If you need to specifically need to look at the files, there are ways to get that info, but it’s unusual to need that. Perhaps there was something more to your question?

Not sure which IDE that you have. But if you are using IDLE, it should be located here (also assuming that you have the latest Python version 3.12):


By the way, if you try re-installing it via pip (for test purposes of course), it should give you the following message (telling you where it was downloaded to):

Requirement already satisfied: package_name in folder_location_stated_here.

Another approach: pip show deepxde will tell you the exact path in Location. In my case, the full path is C:\Users\<my login>\AppData\Roaming\Python\Python310\site-packages\deepxde.

pip show deepxde
Name: DeepXDE
Version: 1.11.0
Summary: A library for scientific machine learning
Author-email: Lu Lu <lululxvi@gmail.com>
License: LGPL-2.1
Location: c:\users\<your_login>\appdata\roaming\python\python310\site-packages
Requires: numpy, scipy, scikit-learn, matplotlib, scikit-optimize

The install location for packages has no direct relationship in general with what IDE one is using, unless you’re installing packages with your IDE’s tools rather than pip on the command line, and the IDE does something custom for package install location (e.g. creates venvs in some centralized directory). Instead, install location will depend on a variety of factors (the Python you’re using, whether you’re using a venv or conda env, whether --user was passed to the command, other CLI flags, env variables, etc).

However, you can determine where a particular package is installed by importing the package, e.g. import package_name, and then checking package_name.__file__. You can also do with with importlib, pip list -v or a number of other options, and can make a reasonable guess at where it might be with the output of python -m site.

1 Like