pip install --no-index : packages not found by pycharm Follow
-- solved.
hi,
i configured pycharm to use a remote interpreter located within an env created using `virtualenv`.
i installed some pacakges using `pip install <package>` downloaded from pypi.
and i installed some other packages using `pip install <package> --no-index` to use locally built wheels (recommended).
now, when i setup pycharm to use the interpreter within that env, it:
1. recognizes packages installed without --no-index.
2. fails to find packages installed with --non-index or packages that depend on packages installed with --no-index.
when i checked the location of the installed packages:
1/ without --no-index: they are located inside the env. [fine]
2/ with --no-index: they are located somewhere outside the env in a share partition on the server [for some reason].
this may explain why pycharm could find packages installed with --non-index.
my question, how to make pycharm see all packages independently from where they are located?
i assume that pip should do something about this by adding a link or something to the packages located outside the env.
or it did but pycharm did not realize that.
i tested the env directly on the remote. things work fine. python sees all type of packages.
things work as expected/fine on other servers.
--
the reason that pycharm does not see the packages is that i have to load some filesystem modules so the link in the env where they are installed will make sens.
is there a way to tell pycharm to run a bash script before starting the remote interpreter?
something similar to preactivate in virtualenvwrapper that runs a bash script before activating the env.
+++++++++++++++++++
i had to manually add the path to the modules needed to be loaded in the interpreter list of path.
go the the list of interpreters and click on `show paths for the selected interpreter`. then, add your additional paths.
thanks
Please sign in to leave a comment.
Hi,
You can add them to interpreter paths and restart IDE or call "Rescan available packages" action to make PyCharm index those packages.
It seems you have posted a duplicate thread where you found the same solution.
thanks
yes, adding the location of the packages into the interpreter paths solved it.
sorry about the duplicated post. i am not really sure how that happened.
thanks for pointing that out. i deleted the other one.
thanks