gnuplot x11 and OSX 10.8.2 - osx-lion

I am trying to use gnuplot with OSX 10.8.2, and see x11 is an ambiguous or unknown terminal type. A bit of research shows x11 is not supported, and I download XQartz, but I still get the same error message.
I edit .bash_profile with export GNUTERM = 'x11' then try ln -sf /Application/Utilities/XQuartz.app/ X11.app as suggested here
But still the same error message.
What else can I try to plot my gnuplot files (both on my laptop and from a server)?
Thank you.

The problem was resolved by rebuilding Gnuplot after I installed XQuartz.

Related

Recipe terminated with fatal error: spawn latexmk ENOENT

I have just installed debian 10 as well as vscode. I have been struggling with this for 3 days now.. I installed texlive from terminal with the following command:
sudo apt install texlive
I then installed the latex workshop extension in vscode and tried building a .tex file. The following error popped up:
Recipe terminated with fatal error: spawn latexmk ENOENT.
I then preceded to install latexmk from terminal with:
sudo apt install latexmk
The same error kept popping up after that. The output showed this.
[14:59:34] Recipe step env: {}
[14:59:34] cwd: /home/phoenix/Documents/stellies/year4/2021/s&s-414/pracs/prac-4/report
[14:59:34] LaTeX build process spawned. PID: undefined.
[14:59:35] LaTeX fatal error: spawn latexmk ENOENT, . PID: undefined.
[14:59:35] Does the executable exist? PATH: /app/bin:/usr/bin:/home/phoenix/.var/app/com.visualstudio.code-oss/data/node/bin:/home/phoenix/.var/app/com.visualstudio.code-oss/data/cargo/bin:/home/phoenix/.var/app/com.visualstudio.code-oss/data/python/bin
[14:59:35] The environment variable $SHELL: /bin/sh
I then proceded to review the texlive website. I noticed that i did not set the path variable to include the texlive binaries. The texlive website gives the following path to the binary files : PATH=/usr/local/texlive/2021/bin/x86_64-linux:$PATH
however /usr/local/texlive does not exist on my system for some reason. Where can i find the correct path to the texlive binaries on Debian 10?
I had the same problem. The root cause was: (1) software's bin folder missing from PATH; (2) bad file privileges. Consequently, VSC couldn't access latexmk, which explains the error messages.
In my case, the problem occurred on a mac, and specifically after I installed MacTex, which, in turn, installs Tex Live. I believe the same solution may apply to linux distros too.
Solution:
Claim file ownership (which was originally root) under folder /usr/local/texlive: sudo chown -R <username> /usr/local/texlive, where <username> is the OS-level user name. The fix will work for this specific user. If it is not enough, try instead setting group owner appropriately, and/or consider Step 3.
Add /usr/local/texlive/2021/bin/<software_dialect> to PATH. <software_dialect> depends on the installed software version: in my case it is universal-darwin; on linux it might be x86_64-linux.
If the problem persists, try to change file access permissions under /usr/local/texlive using chmod.
EDIT: As a final step, restart VSC for changes to take effect.
I recently encountered the same problem on MacOS Monterrey (M1 based). I used basictex (just for the context). As required by the installation instruction,
I added TeXLive to PATH,
installed latexmk package to the TeX distribution.
However, still got the same error as OP.
Afte reading the wiki again more carefully, what finally worked for me was as simple as restarting VS Code and MacOS. Everything works as expected after a reboot of the MAC.
I had this same problem on Mac recently, the fix that worked for me was to uninstall and reinstall the LaTeX Workshop extension.
I got the same issue , seems to be a misbehaving from Vscode on MacOS
check if the command is in the path on mac
-which command_you are running example which latexmk
If this output something that means you have your latex installed, otherwise go and installed it and make sure it is accessible via command line.
If latex is installed and you are getting that issue you can just restart your VSCode and everything will be okay.
Had a similar error and came across this post when looking for a solution.
I wanted to use texlive on Vscode with WSL2 on Windows 10. Installing texlive-full in wsl fixed this error for me.
On Mac, this is a way to fix the issue
Step1: reinstall mactex by downloading it from this link: http://www.tug.org/mactex/mactex-download.html
Step2: In your terminal do cd /usr/local, you should see texlive folder
Step3: In your terminal do sudo vim etc/paths to set the environment. Details are in this link: https://www.architectryan.com/2012/10/02/add-to-the-path-on-mac-os-x-mountain-lion/
Step4: In your terminal do /usr/local/texlive/2021/bin/x86_64-linux at the bottom. check the folder to see if the year is correct. Details in: http://www.tug.org/texlive/quickinstall.html.
Step5: Quit VC code completely, and reopen it.

Visual Studio Code - PHPCS error (Unknown error ocurred. Please verify that returns a valid json object)

I am trying to set up the PHPCS plugin, but so far I am only getting this error:
phpcs: Unknown error ocurred. Please verify that /home/[user]/Documents/offprojects/vet_direct/vetsdirectapp/vendor/bin/phpcs --report=json -q --encoding=UTF-8 --error-severity=5 --warning-severity=5 --stdin-path=/home/[user]/Documents/offprojects/vet_direct/vetsdirectapp/app/Http/Controllers/JobController.php - returns a valid json object.
I followed the installation guide from the plugin page and installed PHPCS both globally and in the project. Also, the command in terminal shows this error:
zsh: command not found: phpcs
Any idea what is wrong here?
This might not help you, but for me, the executable path wasn't correct and the version of PHPCS didn't support PHP 7, it was still using PHP 5.
I'm going to assume you're on Linux based OS.
Since you have already installed PHPCS globally, access the phpcs file. This should be somewhere like ~/.config/composer/vendor/squizlabs/php_codesniffer/bin if you're on Debian based Linux OS (like Ubuntu Focal Fossa 20.04LTS). But it might differ depending on versions.
If you use a text editor to peek the phpcs file inside it (this will be the same on your Executable Path), it might say PHP 5, that's how I found I needed to upgrade mine.
To upgrade your PHPCS do composer global require "squizlabs/php_codesniffer=*" this might fix your issue. After that, you might need to fix your Executable Path again, I had to do mine.
To edit the executable path on Visual Studio Code Command + , (or go to settings) then search for PHP CodeSniffer. Go down to Executable Path and make sure it's correct.
This might not work, but it's worth a try.
After trying a lof of different things, this is what worked for me. I'm on a Mac and using Zsh.
First, installed PHP Code Sniffer (phpcs) with Composer, as Hugo suggested on the answer above:
composer global require "squizlabs/php_codesniffer=*"
But then, I had to edit my .zshrc and added this line:
export PATH=/Users/YOURUSER/.composer/vendor/bin:$PATH
After that, close the Terminal and I was able to run phpcs -h
In my case an error was being thrown by various processes "Could not load xdebug because it is already loaded". This did not show in VSCode, but did if I ran php -v or php --ini.
This is what cleared the error for me:
Edit the /etc/php/8.0/apache2/conf.d/xdebug.ini file and comment out the line zend_extension=xdebug.so. Restart apache with sudo systemctl restart apache2, then try php -v. The "Could not load xdebug because it is already loaded" error should be gone. Restart VSCode and this phpcs error should stop showing.
I have VSCode configured to debug php and have the xdebug configuration settings in both the etc/php/php8.0/apache2/php.ini and etc/php/php/8.0/cli/php.ini files.
How I discovered this is I downloaded the source code and searched for where that error was being thrown. What I found was that ANY error in stderr outside of a very narrow range gets this error message. I had noticed this error showing in my terminal, and I researched how to clear it. When I did, the VSCode phpcs error went away!
On Windows:
Open the XAMPP Control Panel.
Apache -> Config -> php.ini
Search for zend_extension=xdebug.so or something the like and delete it.
Restart Apache.
Try again.
In my case, It was happening due to XDebug and resolved after disabling xdebug from Xampp.
Goto C:\xampp\php\php.ini
find and disable (add ;) before following lines
Change :
xdebug.mode=debug
xdebug.start_with_request=yes
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
to :
;xdebug.mode=debug
;xdebug.start_with_request=yes
;zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
Restart Apache and then vscode. It should fix that.

Can't find launcher in ~/anaconda 2.0 in mac osx

I just did a clean install of ananconda 2.0 (python 3.4) on my mac osx after uninstalling the previous version of anaconda.
I used the graphical installer but the launcher is missing in the ~/anaconda directory.
I tried running spyder and ipython from the terminal but i got long error messages that ended with:
ValueError: unknown locale: UTF-8
I am a newbie to python programming and this is quite unnerving for me. I have gone through related answers but I still need help.
Guys, please kindly point me in the right direction.
Thanks.
You have two problems here:
The Anaconda launcher haven't been ported to Python 3 yet, so that's why you can't find it.
To fix the ValueError: unknown locale: UTF-8 problem, you need to:
Open a terminal
Write this command on it
nano ~/.bashrc (nano is terminal-based editor)
Paste this text in nano:
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
Hit these keys to save: Ctrl+O+Enter, then Ctrl+X to exit.
Close that terminal, open a new one and try to start spyder. Everything should be fixed now.

Unable to plot graphs in iPython notebook, OSX 10.6

i am trying to get inline graphs working in iPython notebook.. i begin by starting ipython with the command ipython notebook --pylab inline.
when i try to use the plot() function i get the following error
im running on OSX 10.6.8 and running ipython out of a virtualenv i have matplotlib and libpng installed
i also get this warning in the terminal
libpng warning: Application built with libpng-1.2.41 but running with 1.5.13
and plot() works normally when i use ipython in the terminal only when i use ipython notebook i get this error.. can someone help me with this..?
I had this problem as well. Another solution is to change the format which the notebook will render images in, from 'png' to 'svg'. This can be done in your config file. Mine is located at:
~/.ipython/profile_default/ipython_notebook_config.py
There is a line that looks like this
# c.InlineBackend.figure_format = 'png'
Uncommenting and changing to 'svg' did the trick for me:
c.InlineBackend.figure_format = 'svg'
This recent question on this board is similar to yours: matplotlib and libpng issues with ipython notebook
See if the solution there solves your issue.
so i finally got this working..
first off i had to get all my outdated ports updated
first i did port selfupdate
then sudo port update outdated
after that i reinstalled ipython using mac ports
sudo port install py27-ipython
then i had to install tornado and pyzmq respectively as ipython depends on it
sudo port install py27-tornado
sudo port install py27-zmq
and then ran it from the terminal
ipython notebook --pylab inline
everything works fine now i can plot maps inline in ipython!
i guess the reason it didnt work before was some problems with pip maybe its installing matplotlib that is build only for libpng 1.2.41 ??... so anyways if anyone else faces this problem id suggest reinstalling all the libraries and ipython via mac ports thats the only thing that worked for me.
Since it was complaining that the versions of libpng used for building and for running are different, I have reinstalled the matplotlib by forcing the path to includes.
CFLAGS="`libpng-config --cflags`" pip install matplotlib -I

nsight eclipse for mac lion debug error

I am using nsight eclipse edition for mac to debug my cuda code. I was able to run cuda-gdb all fine from a terminal but was not able to use the debug function in Nsight. Whenever I started to debug, an error window pops up saying "Error in final launch sequence
Connection is shut down". My OS is Mac Lion (10.7.4).
I understand the big thing in Cuda 5.0 is the interactive debugging with eclipse but sadly I won't be able to use it unless I switch to Windows or Linux. If anybody has seen this or knows a workaround for this, please let me know and your help will be very much appreciated.
Thank you!
I'm afraid you've hit a known issue in CUDA 5.0 Toolkit. Due to some last-minute change, cuda-gdb (which is a shell script) is not entirely valid in Mac OS X. To remedy the problem:
Edit cuda-gdb shell script.
Make line #!/bin/sh the first line in this script.
Save the changes
We apologize for inconvenience. This (and many other) issues will be fixed in the upcoming CUDA 5.0 RC release.
I had this problem in linux recently.
Error in final launch sequence Connection is shut down which means nsight can not start debugger correctly.
first you have to make sure you can run cuda-gdb in terminal. just type cuda-gdb in terminal, if it says like cuda-gdb cannot find some lib in /usr/lib, just download or relink it. after you done this , rerun cuda-gdb in terminal, it should work fine. then you can use nsight debugging tool.