pinellolab / STREAM

STREAM: Single-cell Trajectories Reconstruction, Exploration And Mapping of single-cell data
http://stream.pinellolab.org
GNU Affero General Public License v3.0
173 stars 48 forks source link

stream import in conda env #119

Open ajitjohnson opened 3 years ago

ajitjohnson commented 3 years ago

Hi when I tried to install stream in a new conda env as suggested, I get the following error when importing the package.

---------------------------------------------------------------------------
LookupError                               Traceback (most recent call last)
<ipython-input-1-3c3d5ce47162> in <module>()
----> 1 import stream

/opt/anaconda3/envs/env_stream/lib/python3.6/site-packages/stream/__init__.py in <module>()
----> 1 from .core import *
      2 
      3 __version__ = "1.0"

/opt/anaconda3/envs/env_stream/lib/python3.6/site-packages/stream/core.py in <module>()
     38 import json
     39 
---> 40 from rpy2.robjects.packages import importr
     41 from rpy2.robjects import r as R
     42 import rpy2.robjects as robjects

/opt/anaconda3/envs/env_stream/lib/python3.6/site-packages/rpy2/robjects/__init__.py in <module>()
     17 import rpy2.rlike.container as rlc
     18 
---> 19 from rpy2.robjects.robject import RObjectMixin, RObject
     20 from rpy2.robjects.vectors import (BoolVector,
     21                                    IntVector,

/opt/anaconda3/envs/env_stream/lib/python3.6/site-packages/rpy2/robjects/robject.py in <module>()
     50 
     51 
---> 52 class RObjectMixin(object):
     53     """ Class to provide methods common to all RObject instances. """
     54 

/opt/anaconda3/envs/env_stream/lib/python3.6/site-packages/rpy2/robjects/robject.py in RObjectMixin()
     64     __rclass = rpy2.rinterface.baseenv.get("class")
     65     __rclass_set = rpy2.rinterface.baseenv.get("class<-")
---> 66     __show = rpy2.rinterface.baseenv.get("show")
     67 
     68     __slots = None

LookupError: 'show' not found

Thank you.

huidongchen commented 3 years ago

Hi Ajit,

Thanks for the feedback. I just tested it on my laptop. It seems to work fine for me.

This is what I did:

$ conda create -n test_env_stream python stream=1.0 jupyter -y
$ conda activate test_env_stream
$ jupyter notebook

Then I am able to import stream in Jupyter Notebook.

Is it the same you tried?

wajm commented 3 years ago

I have also similar issue,

ModuleNotFoundError Traceback (most recent call last)

in () 1 import anndata as ad ----> 2 import stream as st /Users/wajm/.pyenv/versions/anaconda3-2020.07/envs/env_stream/lib/python3.6/site-packages/stream/__init__.py in () ----> 1 from .core import * 2 3 __version__ = "1.0" /Users/wajm/.pyenv/versions/anaconda3-2020.07/envs/env_stream/lib/python3.6/site-packages/stream/core.py in () 41 from rpy2.robjects import r as R 42 import rpy2.robjects as robjects ---> 43 from rpy2.robjects import pandas2ri 44 45 from .extra import * /Users/wajm/.pyenv/versions/anaconda3-2020.07/envs/env_stream/lib/python3.6/site-packages/rpy2/robjects/pandas2ri.py in () 21 import numpy 22 import pytz ---> 23 import tzlocal 24 import warnings 25 ModuleNotFoundError: No module named 'tzlocal'
wajm commented 3 years ago

I've found solution. under env, update tzlocal and rpy2.

huidongchen commented 3 years ago

I've found solution. under env, update tzlocal and rpy2.

Thanks for sharing the solution! Unfortunately I have not been able to reproduce this issue myself. But I will certainly keep it in mind for the new version.