Installtion problem of Jupyter in MAC

165 views
Skip to first unread message

Safiqul Islam

unread,
Dec 20, 2019, 10:21:00 AM12/20/19
to Project Jupyter
Dear all

I am trying to use jupyter notebook for my analysis but i could sove this is problem.I am a MacBook Pro user.
I wanted import ipyrad

import ipyrad as ip
import ipyrad.analysis as ipa

but i could not manage,
I am quite some of you know how to solve it, please help me thanks a lot

Screenshot 2019-12-20 at 16.18.00.png



Greg Werner

unread,
Dec 20, 2019, 10:55:03 AM12/20/19
to jup...@googlegroups.com
Hi Safiqul!

I’m also a MacBook Pro user, so I’ll share how my local setup works. There are three general options that I have found to work: conda with conda environments, pip with virtual environments, and docker images/containers. 

- Conda: I would assume you have conda installed since the readme for ipyrad only includes installation instructions for conda. However, I would recommend using conda environments. This helps isolate your conda environments and helps you remain sane :-). 
- Pip: When using pip you can isolate your environments with venv (or other virtual environment manager such as virtualenv).
- Docker: using docker allows you to isolate your environment within containers. You can also combine the use of virtual environments within the container itself. The jupyter docker-stacks images have lots of packages pre installed.

Once you have your environment setup then:

1. Activate your virtual environment
2. Install package(s)
3. Launch jupyter notebook

With docker, you can either build the image from scratch or download one of the pre built images from jupyter docker-stacks which already have conda installed. Then launch your container and notebook. If things work ok, then you can install ipyrad using notebook magics or the included terminal. This makes it flexible for you to customize your environment and share it with others using a standard docker image regardless of their O/S.



On Dec 20, 2019, at 10:21 AM, Safiqul Islam <safi...@gmail.com> wrote:

Dear all

I am trying to use jupyter notebook for my analysis but i could sove this is problem.I am a MacBook Pro user.
I wanted import ipyrad

import ipyrad as ip
import ipyrad.analysis as ipa

but i could not manage,
I am quite some of you know how to solve it, please help me thanks a lot

<Screenshot 2019-12-20 at 16.18.00.png>




--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/1fb09aa4-f0a5-41e2-9980-177580b803c3%40googlegroups.com.
<Screenshot 2019-12-20 at 16.18.00.png>

Safiqul Islam

unread,
Dec 22, 2019, 7:30:19 PM12/22/19
to jup...@googlegroups.com
Dear All

I had a problem to use Jupyter Notebook; I solved it,
Now I am facing a to use ipyrad
Error is:

(base) bash-5.0$ ipyrad
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/bin/ipyrad", line 11, in <module>
    load_entry_point('ipyrad==0.1.32', 'console_scripts', 'ipyrad')()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2793, in load_entry_point
    return ep.load()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2411, in load
    return self.resolve()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2417, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ipyrad/__init__.py", line 4, in <module>
    from . import load
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ipyrad/load/__init__.py", line 16, in <module>
    from .load import load_assembly
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ipyrad/load/load.py", line 13, in <module>
    from ipyrad.core.assembly import Assembly
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ipyrad/core/assembly.py", line 27, in <module>
    from ipyrad.assemble.util import *
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ipyrad/assemble/__init__.py", line 2, in <module>
    from . import demultiplex
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ipyrad/assemble/demultiplex.py", line 14, in <module>
    import cPickle as pickle
ModuleNotFoundError: No module named 'cPickle'

i dont understand how to handle it

Thank you in an advance




--
Safiqul Islam
Founder & CEO, wildmentor (http://www.wildmentor.org/)
Scientific Assistant at Senckenberg Naturhistorische Sammlungen Dresden (http://www.senckenberg.de/)
Doctoral Student (Phylogeography-Ornithology) at Ludwig-Maximilians-Universität München (http://www.uni-muenchen.de/)

Nicholas Bollweg

unread,
Dec 23, 2019, 7:48:22 PM12/23/19
to Project Jupyter
Indeed, that version of ipyrad only works with python 2.7 (cpickle was deprecated, but that's probably the tip of the iceberg). If you can use a newer version, It looks like bioconda has the most recent release: https://anaconda.org/bioconda/ipyrad

It would be a matter of:
conda create -n ipyrad37 -c conda-forge -c bioconda -c defaults python=3.7 ipyrad
source activate ipyrad37

If you need that exact version in your tracebacks to work, you've got your work cut out for you to get all of the dependencies installed, but I would recommend trying to fill all the depdendencies from conda-forge, bioconda and defaults first before trying pypi ones:
name: ipyrad27
channels
:
- conda-forge
- bioconda
- defaults
dependencies
:
- python =2.7
- pip
# ...probably a lot of things
- pip:
 
- ipyrad


Reply all
Reply to author
Forward
0 new messages