Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stream import in conda env #119

Open
ajitjohnson opened this issue Apr 15, 2021 · 4 comments
Open

stream import in conda env #119

ajitjohnson opened this issue Apr 15, 2021 · 4 comments

Comments

@ajitjohnson
Copy link

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
Copy link
Collaborator

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
Copy link

wajm commented Apr 29, 2021

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
Copy link

wajm commented Apr 29, 2021

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

@huidongchen
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants