Hi everyone, I’m a beginner with Julia and currently trying to run a project I found on GitHub: CYCLOPS-2.0
The project was originally written for Julia 1.6, but I’m using a newer version of Julia. Unfortunately, I keep encountering various errors when trying to run the code — likely due to changes in package APIs or syntax between versions.
As someone without much programming experience, I’m struggling to fix the errors myself. I would deeply appreciate any help or advice from the community:
Has anyone successfully run this project on newer Julia versions?
Are there known compatibility fixes or ways to downgrade the environment easily?
Any help or suggestions would mean a lot to me — thank you in advance!
Welcome!
Julia is in active development and therefore syntax can change over time. Changes are typically announced by depreciated warnings (together with a proposal how to adapt it to the new syntax). Then at some revision, the depreciated syntax will not work anymore. Without having tested it, this seems to be the case here. The last commit of CYCLOPS was 6 years ago, and seemingly the package was only developed for a paper.
If you only want to test it, I suggest that you use it with Julia 1.6. I typically have several different (portable) Julia versions on my machines. Download a portable version 1.6 and give it a try. This way, you do not need to downgrade your existing installation.
Unfortunately, the repo does not contain a Project.toml file (meaning that the used versions of the dependecies are unclear). If the approach above does not work, you could also contact the developer.
Just to clarify, Julia abides by semantic versioning: in theory, the code that worked on Julia 1.6 should still work on Julia 1.11, and can only be allowed to break starting with Julia 2.0 (which may never come).
The more likely culprits are package versions though. If you want to be as close as possible to what was done by the authors, I suggest trying to reproduce their package setup along with the corresponding version of the language itself.
I suggest you simply try running it with Julia v1.6, as a troubleshooting step.
As indicated above, syntax breakage because of a Julia release is not likely.
No idea, however, if I were you, I’d try asking on the Github page of the project. The code authors should be well placed to help you and fix any issues.
NB: this code, while it is Julia code, is not strictly a “Julia project” - it’s missing a Project.toml file. Having a Project.toml is a good and standard practice. The authors should probably package their code properly.
Appreciate that this can all be a bit daunting for a newbie, so just to give a concrete suggestion:
If you are managing your Julia installation with juliaup (as suggested on Julia’s Download page), you can do
$> juliaup add 1.6
$> julia +1.6
to start Julia 1.6. Then hit the closing square bracket ] to enter the Package REPL and do:
julia> #hit ]
(@v1.6) pkg> activate --temp
Activating new project at `...\Temp\jl_qSjqz4`
(jl_qSjqz4) pkg> add CSV@0.10.4 DataFrames@1.3.4 Distributions@0.25.68 #...etc for all the packages listed in the readme
Which should give you an environment that allows running the code as is.
I’d have trouble too, it’s very weird that the compatibility constraints are documented entirely in the README instead of being specified in a project file and possibly a manifest file for users to activate and instantiate the environment for the scripts (though you would still have to run the right Julia version to begin with). If the developers didn’t design the project to be used for versions beyond what they specified, it’s not a realistic expectation for users with far less knowledge about the project to make it work on newer versions. Start a Julia 1.6 REPL, start an environment (cd to your working directory, enter the Pkg REPL mode with ], run activate .), add all the listed packages with their specified versions e.g. add CSV@0.10.4, run pin --all to prevent any updates for the environment, finally exit the Pkg REPL mode with backspace to the normal REPL mode where you can run the scripts.
Thank you very much for the clarification and helpful suggestion!
You’re absolutely right — the issue was indeed related to package compatibility rather than Julia itself. After switching to Julia 1.6 and adjusting the package setup accordingly, I was able to successfully run the code.
I really appreciate your insight — it helped point me in the right direction.
Thanks so much for the concrete steps and detailed explanation!
As a newcomer to Julia, I really appreciate you taking the time to lay this out so clearly. Your suggestion to use juliaup and replicate the exact package versions was extremely helpful — I followed the steps and was able to get everything running smoothly on Julia 1.6.
Thank you very much for the detailed explanation and advice! It really helped me understand the proper way to set up the environment, and I appreciate you taking the time to share it.