0

Hi

I created my own package, myOwnLib. I made a link from /path/to/anaconda3/lib/python3.7/site-packages which point to my package, following this : Anaconda: Permanently include external packages (like in PYTHONPATH).

It works perfectly when I don't activate any environment. However, When i "conda activate" an environment, I cannot access to the package anymore and receive the message : "No module named 'myOwnLib'" I can thus link this library with doing the same action /path/to/.conda/envs/previous/lib/python3.7/site-packages/ , but it becomes redundant.

Is there a more generic way to link modules with anaconda?

Thanks in Advance

action attempted: 1) conda develop "/path/to/lib", as suggested here : How to add folder to search path for a given Anaconda environment?

  • 1
    What went wrong with `conda develop`? In general, you have to install packages into a location that can be seen by the Python interpreter; conda environments do a lot of work to make sure they are isolated, so you have to install a package into the environment before you can use it. If you really want it to be available to all of the Pythons on your computer, you can install it into `~/.local/lib/python3.7/site-packages` (I think that's the right folder) – darthbith Feb 08 '19 at 01:56

1 Answers1

0

With a deeper investigation, I notice that conda develop works perfectly IF you use it outside the environnement. Being Inside one don't offer the opportunity to do global changes on How conda manage your Python libs.

Be Carefull: I notice that I cannot use conda develop without having installing pip with conda before ( conda install pip) because conda install pip seems to create lot's of files such as lib, which is needed. Otherwise, you get a message that tells you that it cannot find : path/to/your/env/lib/python3.7/site-packages/conda.pth