Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No such file or directory: 'julia' #6

Open
ShunliRen opened this issue Dec 28, 2020 · 10 comments
Open

No such file or directory: 'julia' #6

ShunliRen opened this issue Dec 28, 2020 · 10 comments

Comments

@ShunliRen
Copy link

After my installing the julia package, the following error happened when I run the code 'gen_models'.
FileNotFoundError: [Errno 2] No such file or directory: 'julia'
WHY? thx!

@Chillee
Copy link
Collaborator

Chillee commented Dec 30, 2020

You need to install Julia in order to generate the spectral embeddings.

If you're too lazy, you can just run the models without the spectral embeddings - I think MLP + C&S on Products still gets to 83.56 or so.

@ShunliRen
Copy link
Author

The problem is that after my installing julia, the error occur. I CAN import julia ,but the error happened. Even i don't use "use-embedding" , the error still occurs.
FileNotFoundError: [Errno 2] No such file or directory: 'julia'

@Chillee
Copy link
Collaborator

Chillee commented Jan 4, 2021

Can you post the exact command you're running, as well as the stack trace?

@ShunliRen
Copy link
Author

ShunliRen commented Jan 4, 2021

python gen_models.py --dataset products --model mlp --hidden_channels 200
` Namespace(dataset='products', device=0, dropout=0.5, epochs=300, hidden_channels=200, log_steps=1, lr=0.01, model='mlp', num_layers=3, runs=10, use_embeddings=False)

embeddings/spectralproducts.pt not found or not enough iterations! Regenerating it now
Traceback (most recent call last):
File "gen_models.py", line 207, in
main()
File "gen_models.py", line 148, in main
embeddings = preprocess(preprocess_data, 'spectral', post_fix=args.dataset)
File "/DATA2_DB1/data/slren/CorrectAndSmooth/diffusion_feature.py", line 116, in preprocess
return spectral(data, post_fix)
File "/DATA2_DB1/data/slren/CorrectAndSmooth/diffusion_feature.py", line 84, in spectral
jl = Julia(compiled_modules=False)
File "/DB/rhome/slren/data2/miniconda3/lib/python3.8/site-packages/julia/core.py", line 468, in init
jlinfo = JuliaInfo.load(runtime)
File "/DB/rhome/slren/data2/miniconda3/lib/python3.8/site-packages/julia/juliainfo.py", line 68, in load
proc = subprocess.Popen(
File "/DB/rhome/slren/data2/miniconda3/lib/python3.8/subprocess.py", line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/DB/rhome/slren/data2/miniconda3/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)

FileNotFoundError: [Errno 2] No such file or directory: 'julia'`
I do not use embedding.
and how to generate embedding?

@Chillee
Copy link
Collaborator

Chillee commented Jan 10, 2021

Ah - comment out line 148 and 147 here: https://github.com/CUAI/CorrectAndSmooth/blob/master/gen_models.py#L148 to run without embeddings.

To install Julia for generating the spectral embeddings, you need to install pyjulia in addition to the actual Julia language itself: https://julialang.org/

@koooooooook
Copy link

Similar problem here!
I installed Julia and made PATH all right, but it says
" julia.core.UnsupportedPythonError: It seems your Julia and PyJulia setup are not supported. "
Could you please tell me what version did you use? (Python, Pytorch, cuda, Julia, PyJulia)
Mine was (3.7.7, 1.8.0, 10.1, 1.5.4, ???)

@ShunliRen
Copy link
Author

3.8.3 , 1.7.0,10.2,0.5.6. _

@q-hwang
Copy link
Member

q-hwang commented Mar 19, 2021

I am using python 3.6.10, pytorch 1.6.0, cuda 10.1, julia 1.0.5, pyjulia 0.5.6. Please check against the installation steps in https://pyjulia.readthedocs.io/en/latest/installation.html.

@chewnglow
Copy link

  1. You need to run import julia; julia.install() in addition.
  2. It seems that PyCharm run configuration may cause the error. Directly run in shell seems fine.

@LH-mmm
Copy link

LH-mmm commented Dec 24, 2021

Hi, I also have a question about Julia
image

' from julia import Main ' no Main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants