Unusual Error in Julia

Whenever I download Julia I get the error “ArgumentError: “/private/tmp/PKInstallSandbox.21we0o/tmp” is not a directory”

Does anyone know I can get around this so that I can download pluto

Welcome to the discourse! :smile: Your post is missing some important information like what Julia version are you running, what was the precise command you tried to enter and how did you install/setup Julia.

I also recommend having a look at

In particular, I’ll note also that the error you posted looks like a Julia error, so you must have tried to run something. So what you tried to run or do is important information beyond just downloading Julia.

It is Julia 1.9.3 and I installed Julia through Download Julia

Finally I entered the command:
julia> ]
(v1.7) pkg> add Pluto

The (v1.7) tells me you are likely running Julia 1.7 (or activated an environment with the name “v1.7”). So something went wrong with your installation and you are now executing an old version of Julia. Maybe try deleting all old julia stuff and then try to use juliaup for easy installation.

4 Likes

I would recommend using Juliaup as the method to install and upgrade Julia.

https://github.com/JuliaLang/juliaup

I had a lot of difficulty trying to get a working environment… until I used Juliaup. Particularly with VSCode. There always seemed to be a path problem because VSCode would not keep my path after I made changes to it (as well as in VSCode settings). Also, it always seemed that I was in a different environment.

Juliaup helped to simplify everything and made it very easy for me to manage.

3 Likes

Hi all,
Thank you for your help. I have tried Juliaup however I am still getting the same issues.

Along with the error should have been a “Stacktrace”. That will be very helpful to provide, along with the system you are running on. versioninfo() inside Julia can provide that.

1 Like

I do not understand how “private/tmp/PKInstallSandbox.21we0o/tmp” would arise for Julia. This implies the use of an installer, but Julia is distributed via dmg on mac.

We also missing what happens between downloading Julia and when you get the error? Do you double click on something? Use the terminal?

What happens when you open a terminal and invoke julia? Or juliaup?

1 Like

Like others have said, that (v1.7) is a sign that you’re not running Julia 1.9.3 as intended. What happens when you type:

which julia

Also try this:

juliaup status

This may help us figure out what’s going on. In the meanwhile, I hope doing this will give you 1.9.3:

~/.juliaup/bin/julia

What OS are you running?

  1. Windows
  2. Mac
  3. Linux

What do you get when you run this on the commandline?

$ julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.9.3 (2023-08-24)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

What happens when you do this?

$ which julia
/usr/local/bin/julia

$ ls -l /usr/local/bin/julia
lrwxr-xr-x  1 ssiew  admin  62  8 Jun 18:16 /usr/local/bin/julia -> /Applications/Julia-1.9.app/Contents/Resources/julia/bin/julia

Hi very sorry that was a miscommunication because I was copying the code that I was inputing the Julia that I am running is 1.9.3 not 1.7

[quote=“StevenSiew, post:11, topic:105062”]

$ which julia
/usr/local/bin/julia

when i put in that first bit I received " ERROR: syntax: extra token “julia” after end of expression

Stacktrace:

[1] top-level scope

@ none:1"

I believe that I am running Mac

While you may be intending to run Julia 1.9.3, you are in fact running Julia 1.7. We see this when you run the Pkg REPL.

I recommend that you first uninstall all versions of Julia from your system. Make sure that trying ti run Julia results in an error afterwards. Perhaps you tried installing Julia a while ago and forgot about it. Maybe you used Homebrew?

1 Like

The $ indicates that the command should be run in the shell terminal, not within Julia.

3 Likes

I believe that I am running Mac

You believe? You don’t know what kind of machine you have?

Open a terminal on your Mac and type these
aaa

https://www.idownloadblog.com/2019/04/19/ways-open-terminal-mac/

1 Like

In the juliaup website GitHub - JuliaLang/juliaup: Julia installer and version multiplexer

Screen Shot 2023-10-24 at 12.58.22 AM

You have to consider that a lot of users on a Mac does not know what a shell is, much less how to open a shell

Perhaps you need to add instructions on how to open a terminal before the user can even type in the magical commands above.

I think we may need to address that there is an existing Julia install from a foreign source on the system in question. Thus I’m recommending we make we make sure to clear out any existing Julia install which may be interferring with a new install.

I think we may need to address that there is an existing Julia install from a foreign source on the system in question. Thus I’m recommending we make we make sure to clear out any existing Julia install which may be interferring with a new install.

There are multiple issues here

  1. (Latest version of) Julia not installed properly
  2. Old version of Julia installed, interfering with latest version of Julia
  3. The instructions to install Julia not clear on “Julia Download” webpage. The hyperlink (Platform Specific Instructions for Official Binaries) is not next to the latest Julia version but is located further down the webpage.
  4. Juliaup website not giving Mac users, step by step instructions to install juliaup