0

I have downloaded cusignal with Conda using:

conda create -n rapids-22.02 -c rapidsai -c nvidia -c conda-forge \
    cusignal=22.02 python=3.8 cudatoolkit=11.2

I have many other libraries that I use in main terminal, i.e., without activating environment. However, I cannot access the cusignal module from there:

mark@linuxdesktop:~ python3
>>import cusignal

No library found. But when I activate the environment that I have downloaded the cusignal library it doesn't give any error.

(rapids-22.02) mark@linuxdesktop:~ python3
>>import cusignal

To be able to use the cusignal properties in main system, is there any way to access that library without activating this environment?

merv
  • 67,214
  • 13
  • 180
  • 245
secokit123
  • 41
  • 1
  • 3
  • To my knowledge, you have to either install you packages to the base environment or make a clone of the base environment and add the new packages to that environment: https://stackoverflow.com/questions/39746749/branch-or-fork-a-conda-environment – Tzane Mar 22 '22 at 14:07
  • Thanks for clarifying. Generally, reconsider your workflow. While it may seem convenient to pile everything into a single monolithic environment, organizing your projects into distinct sets of software requirements is more sustainable and eases the transition to production. – merv Mar 23 '22 at 20:29

1 Answers1

1

Not in any way that isn't a hack. The RAPIDS libraries rely on compiled packages that are managed through Conda, and trying to load the module outside of the context that provides those compiled libraries can lead to undefined behavior (e.g., missing symbol references).

PYTHONPATH (not recommended)

Technically, if the Python version matches up through minor (e.g., both are 3.8), one could try including the environment's site-packages via the PYTHONPATH environment variable. That is, something like,

mark@linuxdesktop:~ PYTHONPATH=/path/to/envs/rapids-22.02/lib/python3.8/site-packages python3
>> import cusignal

should at least find the package, but it might have an issue loading shared libraries.

merv
  • 67,214
  • 13
  • 180
  • 245