[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Python #YFB-256906] Re: trouble getting drilsdown into unidata-workshop conda env

I think that's a red herring, those look like alternate kernels. What does this show when run at the terminal:

jupyter kernelspec list

As far as your other problem is concerned, I'm tempted to just try to nuke all drilsdown.pyc files on your system (they're automatically regenerated). You could do this from your home with

find . -name drilsdown.pyc -delete


On Thu, Feb 1, 2018 at 1:05 PM, Mapes, Brian Earle <address@hidden> wrote:
I get the same error in a freshly created environment.Â

One clue: When I open a new notebook, I get a choice of kernels that reflects some long-past history of my stabs at jupyter over the past 2.5 years. (screen shot). Perhaps the sandbox is not as protected from legacy effects as it is sold to be? ÂSuch a problem might makes me both more appreciative of the possibility of multiple environments, and unsatisfied with the present implementation of that.Â


On Feb 1, 2018, at 1:54 PM, Ryan May <address@hidden> wrote:

Worked for me just now, both installing to an existing environment, and adding to the environment.yml and creating a new environment from scratch.

The error message indicates that it encountered a problem when trying to import drilsdown (a bad header in a .pyc file, a cached version of the parsed python code).

The simple, brute force solution would be to nuke it and try again:

conda env remove -n unidata-workshop
conda env create -f environment.yml


On Thu, Feb 1, 2018 at 2:58 AM, Mapes, Brian Earle <address@hidden> wrote:
Folks, I wanted to have my class get drilsdown into their "unidata-workshop" environment. I know, we should rename the environment as my course number. But we are trying to work from success and then adapt, and are still playing close to the base.Â

Here is the error: Â

1. I added ipywidgets and drilsdown to the environment.yml file as shown here.Â
 Â- ipywidgets
ÂÂ - pip:
ÂÂ Â - python-awips
ÂÂ Â - mpldatacursor
ÂÂ Â - drilsdown
I executed conda env update -f environment.yml
It appeared to install both new packages. No problems.Â

2. The beloved incantation
source activate unidata-workshopÂ

3. I set the necessary path
(unidata-workshop) bash-3.2$ export IDV_HOME=/Applications/IDV_5.4u1/Â

4. jupyter notebook

5. In a notebook code cell,Â
%reload_ext drilsdown

gets this error

ImportError                               Traceback (most recent call last)
<ipython-input-2-06399fbebf41> in <module>()
----> 1 get_ipython().run_line_magic('reload_ext', 'drilsdown')

//anaconda/envs/unidata-workshop/lib/python3.6/importlib/_bootstrap_external.py in _validate_bytecode_header(data, source_stats, name, path)

ImportError: bad magic number in 'drilsdown': b'\x03\xf3\r\n'

Ryan May, Ph.D.
Software Engineer
Boulder, CO

Brian Mapes, Professor
Department of Atmospheric Sciences
Meteorology and Physical Oceanography Program
RSMAS, University of Miami
4600 Rickenbacker Causeway
Miami, FL 33149-1098

phone: (305) 421-4275
fax: (305) 421-4696
email: address@hidden

Ryan May, Ph.D.
Software Engineer
Boulder, CO

PNG image