Git Product home page Git Product logo

Comments (7)

arooj1 avatar arooj1 commented on June 4, 2024 3

i am facing the same issue. Any solution so far?

from gmaps.

sbenston avatar sbenston commented on June 4, 2024 1

I was having this issue for a few days but fixed it by creating a new environment with older versions of the packages I needed, so ylnhari's suspicion that there might be some conflict with package versions seems to be on the money. Since I'm working through a class that wants us to have everything installed with Anaconda my environment isn't super custom, but it worked when I downgraded from the most up-to-date version to anaconda=5.3.0.

For a more general approach my intuition is to target the packages that are specifically referred to in gmaps's requirements.txt (six, ipython>=5.3.0, ipywidgets>=7.0.0, traitlets>=4.3.0, geojson>=2.0.0). I'm afraid I'm far too much of a novice to walk through building only what might be necessary into an environment, so I hope this is enough of a jumping off point for people who want to avoid installing bloat. However if anyone running into this issue wants a quick and dirty solution and isn't too picky about what gets added to the environment, here's what I did:

  1. Create new environment with python 3.7.0
  2. Activate the environment and install anaconda=5.3.0
  3. Install gmaps
  4. Since my environment's jupyter kernel wasn't created I used: python -m ipykernel install --user --name myenv --display-name "Python (myenv)"
  5. ipywidgets widget extensions were enabled but despite using conda, gmaps's widget wasn't, so I ran: $ jupyter nbextension enable --py --sys-prefix gmaps to load it.

This is just a workaround I think if the current versions of one the gmaps requirements is causing conflicts. I went down a few rabbit holes looking into the errors that get logged to the console and came back with a potential issue with the JS compilier Babel's config. How, where and why that is now getting picked up with updates to python packages is not something I can even guess at let alone attempt to fix, but hopefully this workaround helps for people just looking for things to work!

from gmaps.

timcoote avatar timcoote commented on June 4, 2024 1

I fixed this in a development install by updating babel ( https://github.com/babel/babel-upgrade). The issue seems to be that webpack uses babel to transpile the JavaScript so that it works in older browsers. However, the default version, configured in js/.babelrc and described in js/package.json doesn't do this properly for ES6.

from gmaps.

ylnhari avatar ylnhari commented on June 4, 2024

@arooj1 , I tried running the same on my other workstation with Linux environment whose environment was untouched and it is working fine there ,now I strongly believe that this is due to some requirements libraries of g-maps that could be creating these issues try @sbenston solution let us know your experience.

from gmaps.

philipperemy avatar philipperemy commented on June 4, 2024

Thanks @timcoote .

After spending 7 hours on it, I finally found a way. I made a docker file that solves the problem:

FROM python:3.9.10-buster
MAINTAINER Philippe Remy <[email protected]>

EXPOSE 8888

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update

# Install specific version of node/npm
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs

# Install gmaps
RUN pip install pip --upgrade
RUN pip install jupyter
WORKDIR /gmaps
RUN apt-get install git && git clone https://github.com/pbugnion/gmaps.git .

WORKDIR /gmaps/js
RUN npx babel-upgrade --write
RUN npm update

WORKDIR /gmaps
RUN bash ./dev-install

ENTRYPOINT [ "jupyter-notebook", "--ip", "0.0.0.0", "--port", "8888", "--allow-root", "." ]

from gmaps.

tejalbarnwal avatar tejalbarnwal commented on June 4, 2024

did anybody find here solution to using python3.8 on a virtual environment without conda and without source installation

from gmaps.

philipperemy avatar philipperemy commented on June 4, 2024

@tejalbarnwal it's not possible. You need to use the source installation.

from gmaps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.