Giter Club home page Giter Club logo

Comments (7)

bkamins avatar bkamins commented on July 30, 2024 1

Thank you! As commented I have updated the notebook explaining the issue (I just referred the user to the documentation of Matplotlib in case of errors as there are too many possible problematic scenarios to cover).

from dataframes.

pjgoodall avatar pjgoodall commented on July 30, 2024 1

I'm just running through this tutorial again. The updated set-up notes are good for me. Using PyCall delegates the configuration responsibility to the Julia package developers, where it is safer. the MIT Computational Thinking course seems to take this strategy too.

from dataframes.

bkamins avatar bkamins commented on July 30, 2024

Indeed - I think that in the future we should switch from PyPlot.jl to some other plotting backend. For the time being do you think it will be enough to add a link to https://github.com/JuliaPy/PyPlot.jl#installation where the instructions how to set up PyPlot properly are provided?

from dataframes.

bkamins avatar bkamins commented on July 30, 2024

I have added some more instructions to the notebooks. Can you please have a look if they look clear for you.

from dataframes.

pjgoodall avatar pjgoodall commented on July 30, 2024

@bkamins
Thanks very much for your attention to this! I've been slow getting back to you, because I've been learning to configure too many things...

isfile.(["Project.toml", "Manifest.toml"]) behaved correctly.

the ] status and ] instantiate cells do not print any output, but if I activate the project from a repl I get:

 pkg> activate .
  Activating environment at `~/Tutorials/Julia-Tutorials/JuliaAcademy/DataFrames/Project.toml`

(DataFrames) pkg> st
      Status `~/Tutorials/Julia-Tutorials/JuliaAcademy/DataFrames/Project.toml`
  [69666777] Arrow v1.6.0
  [336ed68f] CSV v0.8.5
  [a93c6f00] DataFrames v1.2.0
  [da1fdf0e] FreqTables v0.4.4
  [38e38edf] GLM v1.5.1
  [b98c9c47] Pipe v1.3.0
  [d330b81b] PyPlot v2.9.0
  [1986cc42] Unitful v1.9.0

Which looks like the correct result, and was quite clear to me.

I tried the notebook again with the python matplotlib python package uninstalled from my enclosing conda environment, and it all instantiated correctly . But the first exercise could not find it.

from dataframes.

pjgoodall avatar pjgoodall commented on July 30, 2024

I think I have a simple solution which gets julia to install everything including Jupyter notebook and MatPlotLib automatically using its internal conda environment.

The user should just have to start the julia repl, activate the tutorial environment, and run notebook().

You may know how to set the julia project .toml to do most of this.

in the repl:

>
ENV["PYTHON"]=""
using Pkg
Pkg.activate()
Pkg.add("PyCall")
Pkg.build("PyCall")
Pkg.add("IJulia")
using IJulia
notebook(;dir=pwd(), detached=true)

References

  1. The PyPlot module for Julia
  2. Public API - IJulia

from dataframes.

pjgoodall avatar pjgoodall commented on July 30, 2024

I'm using this now - works for me without any environment other than julia - no need to install Jupyter notebook, MatPlotLib etc...

Project.toml looks like this

[deps]
Arrow = "69666777-d1a9-59fb-9406-91d4454c9d45"
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
FreqTables = "da1fdf0e-e0ff-5433-a45f-9bb5ff651cb1"
GLM = "38e38edf-8417-5370-95a0-9cbb8c7f171a"
IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a"
Pipe = "b98c9c47-44ae-5843-9183-064241ee97a0"
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee"
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"

Use this command line in the Tutorial directory:

PYTHON="" julia -e 'using Pkg; Pkg.activate("."); Pkg.instantiate(); using IJulia; notebook(;dir=pwd(), detached=true) ' 

PYTHON="" julia... sets the python environment to empty before running julia.

I hope that is of some use...

from dataframes.

Related Issues (11)

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.