Issues with remote conda interpreters

Hello everybody,

I work on a remote server on which I have a user miniconda installation.

I used to create remote SSH python interpreters as System Interpreters, indicating the path to my conda environment, e.g., /my/remote/server/user/miniconda3/installation/envs/bin/python (see image attached below).

Now, with the latest PyCharm versions, even if I follow this procedure, the environment is created as a Virtualenv Environment.

This is causing me some problems, especially when debugging third-party libraries' functions, e.g., pytorch. 

It seems the debugger cannot find the location of the remote libraries, i.e., when putting a breakpoint in a third-party library function, I get a pydev debugger: warning: trying to add breakpoint to file that does not exist.

Moreover, even though I have a user miniconda installation, I do not find the Conda Environment option indicated in the docs https://www.jetbrains.com/help/pycharm/configuring-remote-interpreters-via-ssh.html (see image below).

Can anybody help me out, please?

Put here some other information, but please ask whatever you think is missing:

1. PyCharm version → PyCharm 2023.2.5 (Professional Edition), Runtime version: 17.0.9+7-b1000.46 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o ;

2. My local development setup → MacBook M1 Pro 2021 with Sonoma 14.2.1;

3. My remote development setup → Ubuntu 22.04 LTS.

Thank you in advance!

0

Hi, could you please try the latest PyCharm 2023.3.2? https://www.jetbrains.com/pycharm/download/

0

Hey, Andrey Resler, thanks for the reply!

I updated to the latest PyCharm version. 

I can now see the Conda environment option, and I was able to add one of my user installation environments as an interpreter.

However, PyCharm cannot list the packages I installed with pip (see images below).

These are the packages listed by the IDE,

These are the ones present in the environment,

# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
anyio                     3.7.1                    pypi_0    pypi
argon2-cffi               21.3.0                   pypi_0    pypi
argon2-cffi-bindings      21.2.0                   pypi_0    pypi
arrow                     1.2.3                    pypi_0    pypi
asttokens                 2.2.1                    pypi_0    pypi
attrs                     23.1.0                   pypi_0    pypi
backcall                  0.2.0                    pypi_0    pypi
beautifulsoup4            4.12.2                   pypi_0    pypi
bleach                    6.0.0                    pypi_0    pypi
bzip2                     1.0.8                h7f98852_4    conda-forge
ca-certificates           2023.5.7             hbcca054_0    conda-forge
certifi                   2022.12.7                pypi_0    pypi
cffi                      1.15.1                   pypi_0    pypi
charset-normalizer        2.1.1                    pypi_0    pypi
coloredlogs               15.0.1                   pypi_0    pypi
comm                      0.1.3                    pypi_0    pypi
contourpy                 1.1.0                    pypi_0    pypi
cycler                    0.11.0                   pypi_0    pypi
debugpy                   1.6.7                    pypi_0    pypi
decorator                 5.1.1                    pypi_0    pypi
defusedxml                0.7.1                    pypi_0    pypi
dlisio                    0.3.7                    pypi_0    pypi
executing                 1.2.0                    pypi_0    pypi
fastjsonschema            2.17.1                   pypi_0    pypi
filelock                  3.9.0                    pypi_0    pypi
flatbuffers               23.5.26                  pypi_0    pypi
fonttools                 4.40.0                   pypi_0    pypi
fqdn                      1.5.1                    pypi_0    pypi
fsspec                    2023.4.0                 pypi_0    pypi
humanfriendly             10.0                     pypi_0    pypi
idna                      3.4                      pypi_0    pypi
imageio                   2.31.1                   pypi_0    pypi
ipykernel                 6.24.0                   pypi_0    pypi
ipython                   8.14.0                   pypi_0    pypi
ipython-genutils          0.2.0                    pypi_0    pypi
ipywidgets                8.0.7                    pypi_0    pypi
isoduration               20.11.0                  pypi_0    pypi
jedi                      0.18.2                   pypi_0    pypi
jinja2                    3.1.2                    pypi_0    pypi
joblib                    1.3.2                    pypi_0    pypi
jsonpointer               2.4                      pypi_0    pypi
jsonschema                4.17.3                   pypi_0    pypi
jupyter                   1.0.0                    pypi_0    pypi
jupyter-client            8.3.0                    pypi_0    pypi
jupyter-console           6.6.3                    pypi_0    pypi
jupyter-core              5.3.1                    pypi_0    pypi
jupyter-events            0.6.3                    pypi_0    pypi
jupyter-server            2.7.0                    pypi_0    pypi
jupyter-server-terminals  0.4.4                    pypi_0    pypi
jupyterlab-pygments       0.2.2                    pypi_0    pypi
jupyterlab-widgets        3.0.8                    pypi_0    pypi
kiwisolver                1.4.4                    pypi_0    pypi
lazy-loader               0.3                      pypi_0    pypi
ld_impl_linux-64          2.40                 h41732ed_0    conda-forge
libexpat                  2.5.0                hcb278e6_1    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-ng                 13.1.0               he5830b7_0    conda-forge
libgomp                   13.1.0               he5830b7_0    conda-forge
libnsl                    2.0.0                h7f98852_0    conda-forge
libsqlite                 3.42.0               h2797004_0    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libzlib                   1.2.13               hd590300_5    conda-forge
markupsafe                2.1.3                    pypi_0    pypi
matplotlib                3.7.2                    pypi_0    pypi
matplotlib-inline         0.1.6                    pypi_0    pypi
mistune                   3.0.1                    pypi_0    pypi
mpmath                    1.3.0                    pypi_0    pypi
nbclassic                 1.0.0                    pypi_0    pypi
nbclient                  0.8.0                    pypi_0    pypi
nbconvert                 7.6.0                    pypi_0    pypi
nbformat                  5.9.0                    pypi_0    pypi
ncurses                   6.4                  hcb278e6_0    conda-forge
nest-asyncio              1.5.6                    pypi_0    pypi
networkx                  3.1                      pypi_0    pypi
notebook                  6.5.4                    pypi_0    pypi
notebook-shim             0.2.3                    pypi_0    pypi
numpy                     1.25.0                   pypi_0    pypi
ocrd-fork-pylsd           0.0.8                    pypi_0    pypi
onnx                      1.15.0                   pypi_0    pypi
onnxruntime               1.16.3                   pypi_0    pypi
opencv-python             4.8.0.74                 pypi_0    pypi
openssl                   3.1.1                hd590300_1    conda-forge
overrides                 7.3.1                    pypi_0    pypi
packaging                 23.1                     pypi_0    pypi
pandas                    2.0.3                    pypi_0    pypi
pandocfilters             1.5.0                    pypi_0    pypi
parso                     0.8.3                    pypi_0    pypi
pexpect                   4.8.0                    pypi_0    pypi
pickleshare               0.7.5                    pypi_0    pypi
pillow                    10.0.0                   pypi_0    pypi
pip                       23.1.2             pyhd8ed1ab_0    conda-forge
platformdirs              3.8.0                    pypi_0    pypi
prometheus-client         0.17.0                   pypi_0    pypi
prompt-toolkit            3.0.39                   pypi_0    pypi
protobuf                  4.25.1                   pypi_0    pypi
psutil                    5.9.5                    pypi_0    pypi
ptyprocess                0.7.0                    pypi_0    pypi
pure-eval                 0.2.2                    pypi_0    pypi
pycocotools               2.0.7                    pypi_0    pypi
pycparser                 2.21                     pypi_0    pypi
pygments                  2.15.1                   pypi_0    pypi
pyparsing                 3.0.9                    pypi_0    pypi
pyrsistent                0.19.3                   pypi_0    pypi
python                    3.11.4          hab00c5b_0_cpython    conda-forge
python-dateutil           2.8.2                    pypi_0    pypi
python-json-logger        2.0.7                    pypi_0    pypi
pytz                      2023.3                   pypi_0    pypi
pywavelets                1.4.1                    pypi_0    pypi
pyyaml                    6.0                      pypi_0    pypi
pyzmq                     25.1.0                   pypi_0    pypi
qtconsole                 5.4.3                    pypi_0    pypi
qtpy                      2.3.1                    pypi_0    pypi
readline                  8.2                  h8228510_1    conda-forge
requests                  2.28.1                   pypi_0    pypi
rfc3339-validator         0.1.4                    pypi_0    pypi
rfc3986-validator         0.1.1                    pypi_0    pypi
scikit-image              0.21.0                   pypi_0    pypi
scikit-learn              1.3.1                    pypi_0    pypi
scipy                     1.11.1                   pypi_0    pypi
segment-anything          1.0                      pypi_0    pypi
send2trash                1.8.2                    pypi_0    pypi
setuptools                68.0.0             pyhd8ed1ab_0    conda-forge
shapely                   2.0.2                    pypi_0    pypi
six                       1.16.0                   pypi_0    pypi
sniffio                   1.3.0                    pypi_0    pypi
soupsieve                 2.4.1                    pypi_0    pypi
stack-data                0.6.2                    pypi_0    pypi
sympy                     1.12                     pypi_0    pypi
terminado                 0.17.1                   pypi_0    pypi
threadpoolctl             3.2.0                    pypi_0    pypi
tifffile                  2023.7.18                pypi_0    pypi
tinycss2                  1.2.1                    pypi_0    pypi
tk                        8.6.12               h27826a3_0    conda-forge
torch                     2.1.2+cu118              pypi_0    pypi
torchvision               0.16.2+cu118             pypi_0    pypi
tornado                   6.3.2                    pypi_0    pypi
tqdm                      4.66.1                   pypi_0    pypi
traitlets                 5.9.0                    pypi_0    pypi
triton                    2.1.0                    pypi_0    pypi
typing-extensions         4.4.0                    pypi_0    pypi
tzdata                    2023.3                   pypi_0    pypi
uri-template              1.3.0                    pypi_0    pypi
urllib3                   1.26.13                  pypi_0    pypi
wcwidth                   0.2.6                    pypi_0    pypi
webcolors                 1.13                     pypi_0    pypi
webencodings              0.5.1                    pypi_0    pypi
websocket-client          1.6.1                    pypi_0    pypi
wheel                     0.40.0             pyhd8ed1ab_0    conda-forge
widgetsnbextension        4.0.8                    pypi_0    pypi
xz                        5.2.6                h166bdaf_0    conda-forge

Moreover, I cannot see the libraries in the External Libraries section of the project.

If instead I try to add the conda environment as a System Interpreter, PyCharm again adds it as a Virtualenv Environment.

Is this behavior expected?

Thanks again for your time and help!

0
The conda button in the toolbar on your screenshot allows you to switch between the conda and pip package managers, showing the respective package lists.

The new Python Packages tool window (https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-upgrading-packages.html#packages-tool-window) don't have that option, but it should show you a combined list. There's a request for it PY-48047 (https://youtrack.jetbrains.com/issue/PY-48047)
0

Thanks for the heads up!

I switched to the pip package manager using the conda button in the toolbar and can now see all the packages. 

Moreover (I don't know why, TBH), I can also see the Remote Libraries in the External Libraries section after switching.

I'd say my problem has been fixed :) Thanks for the time and replies!

0

请先登录再写评论。