sleepymalc / VSCode-LaTeX-Inkscape

✍️ A way to integrate LaTeX, VS Code, and Inkscape in macOS
https://pbb.wtf/posts/VSCode-LaTeX-Inkscape/
MIT License
364 stars 24 forks source link

Problem with integration of inkscape-figures #18

Closed greyback2305 closed 1 year ago

greyback2305 commented 1 year ago

Hello, I have been trying to make this setup for the past few days, and now that it works pretty well for the first part, i wanted to integrate Inkscape. The only issue, it seems, is related to the integration of "inkscape-figures". I have downloaded successfully choose-gui and inkscape-figures, in the same way as intented, except that the command weren't working, so i changed a bit them, but it seemed to work. But just after installing it, i tried to type the command inkscape-figures, and it didn't work. I got zsh: command not found: inkscape-figures. Do i need to install the files in PATH ? I had an warning message when installing inkscape-figures whith pip3 install inkscape-figures saying that nosetest and nosetest 3.7 weren't in path. I am totally new to coding so excuse my incompetence. Thanks for the response

sleepymalc commented 1 year ago

Right, your computer finds executables under all the directories in your $PATH variable. So, in this case, seems like the inkscape-figures (an executable) is in a directory that is not in your $PATH variable. Just add it into your $PATH variable then you should be good to go.

greyback2305 commented 1 year ago

Ok, so i have tried to add these files in path, by doing like this in my .bash_profile

Capture d’écran 2023-01-12 à 22 00 17

it didn't seemed to work, even after rebooting the terminal, so i also tried to put directly the inkscapefigures folder directly in path.

Capture d’écran 2023-01-12 à 21 51 05

This was the message i got when installing inkscape-figures, so i added these files in path, like said before. When i type the command "inkscape-figures" in the terminal i got this (i put it here even if it does not seem useful.

Capture d’écran 2023-01-12 à 21 50 43
sleepymalc commented 1 year ago

Hmm, maybe try inkscape-figures instead of inkscapefigures? The former is the executable's name, while the latter (where you seemed to be typing in the terminal) is not.

greyback2305 commented 1 year ago

yeah, that was the wrong screenshot, i got the same error for typing inscape-figures

sleepymalc commented 1 year ago

I guess the first thing you should do is to find where is inkscape-figures installed and try to run it via the terminal to make sure it's correctly installed.

greyback2305 commented 1 year ago

So inkscape-figures seems to be located in the intended spot

Capture d’écran 2023-01-14 à 19 01 52

I really don't understand why it isn't working but thanks for your help still

sleepymalc commented 1 year ago

Can you print out your $PATH variable? You can use echo $PATH to see what's in your $PATH.

greyback2305 commented 1 year ago
Capture d’écran 2023-01-14 à 22 45 31
sleepymalc commented 1 year ago

Yes, the problem is that $PATH will not do a recursion search, i.e., if your executable is under /path/dir, and you only have /path in your $PATH, then your system will not be able to find the executable except you add /path/dir explicitly. So you should add exactly Users/gabriel/Library/Python/3.8/lib/python/site-packages (1.0.8) into your path.

greyback2305 commented 1 year ago
Capture d’écran 2023-01-15 à 11 01 38

So i added, like you said the accurate directory in $PATH, but again, command not found when i typed inkscape-figures. Here is site-packages in Finder, if you see something. Thanks again

Capture d’écran 2023-01-15 à 11 02 10
sleepymalc commented 1 year ago

You path should include your executable, i.e., inkscape_figures. For example, my inkscape_figures executable is in Users/pbb/opt/anaconda3/bin:

image

so my $PATH also includes this:

image

Make sure you understand how that $PATH works.

greyback2305 commented 1 year ago

ok, sorry for the wait, i had an exam last week. I just checked and i think that i understand now.
I found the problem. It was only that the names of the files in my path had a ":" at the end. I don't understand why these were like this at first but i didn't paid attention when copy pasting the command in bash_profile lol. Thanks for your help still, that's very cool for the newbies reading your project.