Hot answers tagged

133 votes
Accepted

macOS, the command line developer tool missing after updated to Monterey 12.6

I ran into the same error yesterday, it took a while to notice that the error itself has the solution :) Please ensure Xcode packages are up-to-date — try running 'xcodebuild -runFirstLaunch'. Indeed,...
68 votes
Accepted

Accidentally deleted log file of running process `python something.py 2>&1 | tee .log`. Is there a way to still save the output on the tmux-pane?

The file continues to exist as long as the tee process holds an open file descriptor, and everything is still being logged there. You can recover its current contents by copying them through /proc: ...
  • 401k
17 votes

macOS, the command line developer tool missing after updated to Monterey 12.6

Run sudo xcode-select --install You might be prompted to accept a license. Do so. If you try to run git, you’ll still get an error, run this: sudo xcode-select -switch /Library/Developer/...
  • 271
12 votes
Accepted

Why pip throwing an error when installing numpy in Termux?

Use: MATHLIB="m" pip3 install numpy
  • 186
5 votes

grep is not recognized as an internal or external in windows

Use findstr instead grep, because cmd doesn't cover grep syntax as it works on Linux.
  • 51
4 votes

Pip install doesn't work on m1 Mac

I am really sorry for this question I just recognized that i have to type pip3
4 votes

How to check if Night Light is enabled on Windows 10 using a batch file and enable/disable it?

This is a straight copy/paste from another superuser answer (by Ben N) that I found by following your link. Is there a reason this doesn't work for you? To be honest I shouldn't get an upvote ...
  • 5,404
3 votes

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)

If you are working within a corporate environment that decrypts your traffic, or possibly proxy servers as part of a VPN, then I have found that the certifi library fails to include the certificate ...
  • 131
3 votes

Is it OK to host a Python's http.server accessible from the Internet?

I'm running python3 -m http.server 8080 together with port forwarding to have access to files from my laptop from anywhere. This can roughly be translated to: I'm ripping a giant hole in my laptop's ...
3 votes
Accepted

merge 3 txt files with custom format

Yes, it is possible to merge the three files into the format you described. You can use a simple script to do this. Here is an example of how you could do it in Python: # Open the first file in read ...
  • 46
2 votes

How to figure out why meld takes a long time to start?

I experience this very slow start of meld on a headless Debian 11 server accessed through SSH with -X forwarding enabled. The problem seems to be described in this bug report: https://gitlab.gnome.org/...
  • 3,196
2 votes

How to properly upgrade gcc on Centos 7?

I've confirmed that you can upgrade gcc from the default version 4.8 on centOS 7. First, we need to install "Software Collections" in order to access some of the community packages including ...
  • 121
2 votes

Ubuntu systemctl service fails with: Main process exited, code=exited, status=1/FAILURE

journalctl -u charge_check.service -b to chech what is going on wrong
2 votes

Pip install doesn't work on m1 Mac

The error message WARNING: The scripts pip, pip3 and pip3.9 are installed in '/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/bin' which is not on PATH. Consider adding this ...
  • 2,733
2 votes

Kill specific started process in Windows

If you have only one such process, you may kill the executable: taskkill /im python.exe If the process is stubborn and doesn't terminate, add the /f parameter to forcefully terminate the process. For ...
  • 430k
2 votes

How do I check if files have been encrypted by Ransomware?

Yes, attempting to open the files will let you know if the files are encrypted. If they are able to be opened, then the files have not been encrypted by a third party. If the files are not openable, ...
  • 69.3k
2 votes
Accepted

Windows 11 command prompt printing characters instead of coloured text

Those ] things are part of the ANSI sequence for formatting. The terminal in VS Code supports ANSI sequences so obviously you'll see color properly. The one you're seeing on the screenshot is conhost....
  • 24.7k
2 votes

PYTHONPATH defined on multiple vs single line in fish shell

When you add to PYTHONPATHS on two lines, set is handling it & it knows that there are two Items : this will work. When you add to PYTHONPATHS on one line, you have included a space, set is ...
  • 1,162
2 votes
Accepted

SSH connection through Python cannot run Shell scripts

Found the problem. Whenever I try to run a script, it asks for my password (a strange setting from the IT Team). So my script was not able to run the commands for the scripts (but it was able to run ...
2 votes

GUI Windows Not Appearing in Auto Startup Script

Most such tutorials neglect to explain dependencies – quite a few things happen during startup, and for some people "on startup" means "before event Y", while for others it means &...
  • 401k
1 vote

Automatically answer command input from .py script

Try: echo 3 | python Algo_demo.py or echo %var% | python Algo_demo.py where %var% is a variable you previously defined....
1 vote

How to Access Mapped Network Drive on Windows from the Ubuntu app?

Try the following: map the network drive on Windows, e.g. as drive T: start the WSL2 system create a mount point sudo mkdir /mnt/t mount the mapped network drive sudo mount -t drvfs T: /mnt/t
1 vote

PIP error on MacOS

Is there the problem in the path of Python, is it possible you have removed. In this case use these commands: brew --prefix /lib/python2.7/site-packages pip install -U pip pip3 install --upgrade ...
1 vote
Accepted

How to figure out whether a path is the root of a ZFS dataset mountpoint?

There doesn't seem to be an easy way to tell whether mountpoint is a parent or child. You could use e.g. property usedbychildren that should be 0B for leaf (lowest child) node. $ zfs list -o name,...
  • 1,425
1 vote

IDE for Chromebooks without Developer Mode Acess

I know it's been a while since this thread has had a post, but I thought I'd put in my two cents in case anyone else is wondering like I was a couple months ago.  I had the exact same problem, just I ...
1 vote

Find outdated/updatable pip packages

pip list --outdated | gawk -F ' ' 'NR>2{print$1}' | xargs pip install --upgrade handy way to update all outdate package without install any extra package alias pip-update='pip list --outdated | ...
1 vote
Accepted

Disabling bracketed paste mode in Anaconda-Python REPL on Mac

\e is nonstandard; \033 is standard. The place to look is not in csh/tcsh, but Python, e.g., Pasting into Python REPL broken in recent brew Python builds (HomeBrew #68193). According to a comment by ...
1 vote
Accepted

symlink points to correct binary, but still another is executed?

I suggest using command -v instead of which. You can find more about the reasons behind this in this Unix SE Q/A. The short version: which is a non-standard tool of times long past. command -v is a ...
  • 57k
1 vote

symlink points to correct binary, but still another is executed?

You have installed python once in one place. Then you changed the symlink to another location. I think that you have run into an optimization of bash for not having to search $PATH every time you type ...
  • 430k
1 vote
Accepted

How to run scrapy splash on a Virtual Machine

You'd have to use the following docker command: docker run -d -p 8050:8050 scrapinghub/splash --max-timeout 3600 You forgot the -p parameter for the port forwarding, causing docker to assume that ...
  • 16.1k

Only top scored, non community-wiki answers of a minimum length are eligible