SublimeLinter(ST3/ST2) for C++ (cppcheck/cppint.py) - c++

Equip: Ubuntu 13.04, Sublime 3 + SublimeLinter(was installed from git).
Also, was installed package cppcheck. (aptitude install cppcheck).
cpplint.py was downloaded from google.
Trouble: Sublime doesn`t emphasize errors C++. (python is OK).
What have done, my setting - user:
{
"sublimelinter_syntax_map":
{
"Python Django": "python",
"C++": "c_cpplint" //*doesn`t work.
// "C++": "/usr/bin/cppheck" *doesn`t work.
},
"sublimelinter_executable_map":
{
"c_cpplint": "/home/name/scripts/cpplint.py", // *doesn`t work
// "c_cpplint":"/usr/bin/cppheck" * doesn`t work
"python": "usr/bin/python"
}
}
What`s the deal?
ST2:
cppcheck do nothing.
via cpplint.py
picture
Many thanks.

Here's the solution I've read for cpplint, works perfectly for me. I did the
sudo pip install cpplint
instead of downloading the .py and put it somewhere. This seems to do the trick.
Some people say it's the permission issue on cpplint.py. Try chmod 755 might be another solution(I've not tried it though)

Related

Python2 required as dependencie but already installed

First of all, sorry for my english and sorry for taking your time, I'm pretty sure the answers are online but it seems like I can't find the right keywords for this issue.
The problem: Python2 is installed but still asked as a dependency for every python2 module I want to install with my package manager.
I built python2 from source on Archlinux in a proot environment
(because I use termux on a non rooted phone and it's probably why yay did not worked as expected to install python2) and I think I did it well because "python2" open the python command line and "python2 -V" return me "Python 2.7.18", i can execute python scripts with it, etc.
I built python by downloading and uncompressing python2 from python.org, then in the uncompressed file ./configure --enable-optimization , make -s and make install.
I'm a noob so i don't know but i probably just need a way to handle python2 with pacman or a way to tell pacman that python2 is indeed installed.
repo.
I know to handle manualy built pkgs with pacman, but not software built from source. So i'v found a PKGBUILD for python2 but (again, probably because of the proot) when i use makepkg here what's happen :
[...
...
...]
==> Extracting sources...
-> Extracting Python-2.7.18.tar.xz with bsdtar
==> Starting prepare()...
bsdtar: Removing leading '/' from member names
patching file Makefile.pre.in
patch: setting attribute security.selinux for security.selinux: Permission denied
==> ERROR: A failure occurred in prepare().
Aborting...
So if anyone know how could i make makepkg works as intended or how could i tell pacman that python2 is already installed, it would totaly make my day.
PS : I know python2 is deprecated and as it's not updated anymore the security is getting worse and worse, but it's not for my main setup so don't worry. I also think i could install modules manually but it is not something i wish to do since i'd like to install the all BlackArch repo.

Setting up qt4py2 with with python 2.7 in virtualenv - cannot find the files :(

hopefully this question fits here, I have tried googling and reading "http://pyqt.sourceforge.net/Docs/PyQt4/installation.html" but unfortunately I'm such a newbie in all things linux that I cannot figure out what applies here...
anyway:
I have a virtual env (in Python 2.7)
I am trying to set up labelImg as instructed in : https://github.com/tzutalin/labelImg, specifically I run (with my virtualenv active):
sudo apt-get install pyqt4-dev-tools
sudo pip install lxml (<- did run this as "pip install lxml")
Then I run into problems with this:
make qt4py2
I got error:
"make: *** No rule to make target 'qt4py2'. Stop."
Now from googling I got the impression that I should be in the same directory as the make file when I run make (is this even true?), but when I try to find where pyqt4 is, I cannot find the folder (it is not in ~/.virtualenvs/virP2/lib/python2.7/site-packages$ (virP2 is the name of the virtualenv)
I have also tried to run (with the virP2 still active)
sudo apt-get install python-qt4
but I got:
"python-qt4 is already the newest version"
and I still cannot find where the directory with qt4 files is. (I also looked into the python2.7 folder outside the virtualenv, but it was not there)
Thanks for any advice!

"Bad interpreter: No such file" error with PIP, python 2.7.11

I am trying to run the following code:
pip install mako
I get the following error:
-bash: /usr/local/bin/pip: /usr/local/bin/python2.7: bad interpreter: No such file or directory
I have tried moving pip into the same directory as Python-2.7.11 (usr/lib/Python-2.7.11) and moving Python into the same directory as pip. I have seen a couple of diffrent similar instances to this issue however none seemed to answer my question. This is on linux, and I installed Python-2.7.11 to replace the native 2.6 build that was on the machine. Any help would be appreciated. Cheers
Issue was that pip was look for a python executable that wasn't there. I had to link it with:
ln -s /usr/lib/Python-2.7.11/python python2.7
Hopefully this helps someone with the same issue. Cheers
Was seeing this same issue, I was working in a directory which had an ' in its directory path/name.
However, moving to a directory without apostrophe (') solved this issue.
bash: /home/user/share/f x/User's Files/x/x_y/T/docs/venv/bin/pip: "/home/user/share/f: bad interpreter: No such file or directory

Fabric and virtualenv working on Ubuntu but not on Solaris

I have a project that runs on Ubuntu and Solaris. Fabric works fine with Ubuntu but does not on Solaris. If I try something inside a virtualenv it fails with workon: command not found.
This is how my fabfile.py looks like:
with prefix('workon %s' % env.virtualenv):
sudo('manage.py collectstatic --noinput')
I put those lines in .profile on both platforms:
export WORKON_HOME=$HOME/.virtualenvs
source /path/to/virtualenvwrapper.sh
That's all I've done. Why does Ubuntu work but Solaris doesn't? Any ideas?
It's Virtualenvwrapper that's failing, not Fabric or Virtualenv. Try using Virtualenv directly with:
with prefix('source path/to/virtualenv/bin/activate'):
sudo('manage.py collectstatic --noinput')
EDIT:
to try to fix virtualenvwrapper, try wrapping your code in the following, and see if it solves the original error.
with prefix('source path/to/virtualenvwrapper.sh'):
Consider where you have put the following?
export WORKON_HOME=/opt/virtual_envs
source /usr/local/bin/virtualenvwrapper.sh
According to man bash, the -l flag, that fabric issues, will cause the the following to happen
[bash] looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable.
I had this bootstrap code in .bashrc, which wasn't being sourced by bash -l. I moved those two lines to .profile, and can now do the fabric lines below. (I don't have .bash_profile or .bash_login)
with cd('/www/code'):
with prefix('workon code'):
run('./manage.py validate')

Django coloring output in runserver.py

I want to highlight the output in the console "manage.py runserver"
In Linux, all OK, but in Windows does not work.
The documentation
says: SET export DJANGO_COLORS = "light"
Does not work.
There is a ticket
Nodule is installed: pip install pyreadline
Not work.
Did you apply the patch from the ticket? Otherwise it's not going to work.