Tag Archives: mac

Mac Error: sh: vue-cli-service: command not found

# Clear buffer NPM cache clean — force

#Reinstall NPM/cnpm install

Another online article, roughly said three solutions

1. Reinstall the
Folder node_ Modules are deleted and reinstalled by executing NPM/cnpm install

2. Specify path

./node_ modules/.bin/vue-cli-service build

3. Global installation

npm install @vue/cli-service -g

4. Environment variable node_ ENV=production

Try a few more times. You can refer to it for other reasons https://stackoverflow.com/questions/51172064/command-not-found-with-vue-cli

Error: EACCES: permission denied, unlink ‘xxxx/xxxx/xxxx‘ [How to Solve]

Scenario: on the Mac, if you want to use the code command to open vs code, (CMD + Shift + P) search the shell, find this:

Results Click to find:

	Error: EACCES: permission denied, 
	unlink '/usr/local/bin/code'

In fact, I don’t have read-write permission, and it’s ineffective to search a lot on the Internet. However, I’m used to using the command line to open vs code. The final solution is:

Enter at the command line

sudo chown -R [yourusername] [filePath]

Yourusername: user preferences – & gt; Users and groups – & gt; Current user
filepath: the path displayed when an error is reported

Tips: if not, try to move the path forward. Take me as an example:

sudo chown -R xxx /usr/local/bin

[Solved] Error: [email protected]: wrong number of arguments (given 1, expected 0)

First, let’s talk about the problems I encountered. Brew install & lt; formula> Error reporting:

(venv_mac)  [email protected]  /usr/local/Cellar  brew install cmake
Error: [email protected]: wrong number of arguments (given 1, expected 0)

Even if I quit the previous virtual environment, I opened the debugging information and found:

(venv_mac)  ✘ [email protected]  /usr/local/Cellar  brew install --debug cmake
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/sphinx-doc.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/[email protected]
Error: [email protected]: wrong number of arguments (given 1, expected 0)

Executable/usr/local/homebrew/library/homebrew/brew.rb (formulary:: formulaloader): always loading/usr/local/homebrew/library/taps/homebrew/homebrew core/formula/ [email protected] , which reports an error Python 3.9 parameter transfer error.

It is said on the Internet that brew install cmake can solve the problem, but I still report this error on the premise that cmake has been installed. There is no way but to reinstall homebrew and hope for a new homebrew core/ [email protected] It can be executed normally

(venv_mac)  ✘ [email protected]  /usr/local/Cellar  /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Warning: The Ruby Homebrew uninstaller is now deprecated and has been rewritten in
Bash. Please migrate to the following command:
  /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"


It is found that the script for uninstalling homebrew has expired. It is recommended to use:

/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh )”

Then use this:

(venv_mac)  ✘ [email protected]  /usr/local/Cellar  /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
Warning: This script will remove:
/usr/local/bin/brew -> /usr/local/bin/brew
Are you sure you want to uninstall Homebrew?This will remove your installed packages! [y/N] y
==> Removing Homebrew installation...
Warning: Failed to delete /usr/local/Caskroom
rm: /usr/local/Caskroom: Permission denied
Warning: Failed to delete /usr/local/Cellar
rm: /usr/local/Cellar: Permission denied
==> Removing empty directories...
==> /usr/bin/sudo /usr/bin/find /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/var /usr/local/Caskroom /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks -name .DS_Store -delete
==> /usr/bin/sudo /usr/bin/find /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share /usr/local/var /usr/local/Caskroom /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks -depth -type d -empty -exec rmdir {} ;
==> Homebrew uninstalled!
The following possible Homebrew files were not deleted:
/usr/local/mysql -> /usr/local/mysql
You may wish to remove them yourself.

I didn’t use sudo, so/usr/local/cashroom and/usr/local/cell were not deleted. I forgot that CWD was in/usr/local/cell. Finally, I prompted that a possible homebrw file had not been deleted, so I deleted it manually:

(venv_mac)  ✘ [email protected]  /usr/local  sudo rm -r Homebrew

Then reinstall homebrew according to the latest installation script on the official website:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

This is the installation script of the official website. It uses foreign sources. The download speed is very slow and may fail. Just execute it a few more times. The domestic sources are very unfriendly when upgrading brew later. The error I reported in Python 3.9 this time is homebrew 2.4.9. Even if brew update is still 2.4.9, it will not be upgraded to the latest 3.2.0, so although slow down, I still want to use foreign sources.

Zshrc reports an error after changing the Tsinghua source:

(venv_mac)  [email protected]  ~/cmake_tutorial  source ~/.zshrc
compinit:503: no such file or directory: /usr/local/share/zsh/site-functions/_brew_cask


Then I found that the cmake official website has a DMG installation package that can be installed to/applications, so I downloaded and installed it from the cmake official website. If there is a need to upgrade later, I will directly the whole RM – R  / Applications/cmake.app and then download the latest cmake-3.21.0-macos-universal.dmg installation. Of course, add the path/applications/cmake.app/contents/bin/ to the path.

I was frightened by the mistake reported by the brew install cmake. In the future, the software that I can download from the official website will go to the official website.

Terminal appears after anconda is installed on MAC (base)

After MAC reinstalls anaconda, it is found that each time terminal is opened, anconda’s environment is started by default. However, I don’t want to use anconda’s environment by default, as shown in the following figure.

The closing method is as follows

Method 1:

Every time you exit the base environment through CONDA deactivate on the command line, return to the automatic environment of the system

Method 2

1. By setting Auto_ activate_ Set the base parameter to false to implement:

conda config --set auto_activate_base false

2. If you want to enter, you can use CONDA activate base

3. If you go back and hope to keep it all the time, pass

conda config --set auto_activate_base true


How to solve the problem of “unable to open / dev / vmmon: broken pipeline” when running VMware virtual machine?

When using VMware fusion to install virtual machine system on MAC, sometimes it will prompt “can’t open/dev/vmmon: fracture pipeline”, which is caused by the system blocking some plug-ins of virtual machine


Open system preferences – & gt【 Security and privacy] – & gt【 General], there will be a prompt that the plug-in will block. Click allow; Or modify the system security settings to any source

[Solved] Error: Failure while executing; `tar –extract –no-same-owner –file /Users/wangchuangyan/Library/C

Mac run brew install npm error:
Error: Failure while executing; tar --extract --no-same-owner --file /Users/wangchuangyan/Library/Caches/Homebrew/downloads/01840f175b09e7eb3d4ca7f11492bb1bee74fa7569a41a884c7ffb3418e11a02--libuv-1.41.0.catalina.bottle.tar.gz --directory /private/tmp/d20210708-6134-w2f3oo exited with

1. Here’s the output:
tar: Error opening archive: Failed to open ‘/Users/wangchuangyan/Library/Caches/Homebrew/downloads/01840f175b09e7eb3d4ca7f11492bb1bee74fa7569a41a884c7ffb3418e11a02–libuv-1.41.0.catalina.bottle.tar.gz’
It means that the libuv file cannot be opened
Solution: manually install brew install libuv

How to Solve Cocoapods Installation Failure

The scene appears

Recently, I replaced a 512 large hard disk and re installed MacOS 10.15. When installing cocoapods, the following error occurred

Building native extensions. This could take a while...
ERROR:  Error installing cocoapods:
    ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20210324-1667-1wwdce5.rb extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi,/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/ffi... yes
checking for ffi_prep_closure_loc() in -lffi... yes
checking for ffi_prep_cif_var()... yes
checking for ffi_raw_call()... yes
checking for ffi_prep_raw_closure()... yes
creating extconf.h
creating Makefile

current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/ext/ffi_c
make "DESTDIR=" clean

current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/ext/ffi_c
make "DESTDIR="
make: *** No rule to make target `"/Volumes/macOS', needed by `AbstractMemory.o'.  Stop.

make failed, exit code 2

Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/ffi-1.15.0/gem_make.out


    1. it may be the problem of system version, which is not compatible with the latest version, so install the old version directly. I encountered the problem is 2021.07.06, the latest version is 1.10.1, find a 1.9.32020.05 release, should be compatible with 10.15
# Specify version to install
sudo gem install -n /usr/local/bin cocoapods -v 1.9.3
      1. use brew to install
brew install cocoapods

About the problem of calling tools library by running Python program under Mac OS X, modulenotfoundererror: no module named ‘tools‘

ModuleNotFoundError: No module named ‘Tools’

For example, import the tools library into pcharm of MAC

from Tools.scripts.abitype import classify
from sklearn import datasets
from sklearn.model_selection import train_test_split
from sklearn.metrics import classification_report
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import Patch
from sklearn import datasets
from minisom import MiniSom

The first line will report error!!!

It seems that it is very difficult to change the tools variable in MAC environment. The solutions are as follows

Direct import classify

import classify

The test is effective ~

[Solved] ModuleNotFoundError: No module named ‘requests‘


MacOS 11.4
has been implemented:

pip3 install requests

It’s still wrong.

This reminds me that there are two PIP3

report errors:

import requests
ModuleNotFoundError: No module named ‘requests’

terms of settlement

Execute the following code

/Library/Frameworks/Python.framework/Versions/3.9/bin/pip3 install requests

It was solved successfully.

Cause analysis:
there are two versions of python3 on my computer. I guess one comes with the system. One is that I use brew to install it automatically due to dependency.

The environment variable is /usr/local/opt/ [email protected]/bin/pip3 script is executed in /Library/Frameworks/Python.framework/Versions/3.9/bin/pip3.

The following test shows that my python3 and PIP3 paths do not match.

[email protected]: ~ $ which python3                                                                           [16:43:26]
[email protected]: ~ $ ls -all /usr/local/bin/python3                                                          [16:43:29]
lrwxr-xr-x  1 itkey  admin  69 12 22  2020 /usr/local/bin/python3 -> ../../../Library/Frameworks/Python.framework/Versions/3.9/bin/python3
[email protected]: ~ $ which pip3                                                                              [16:43:32]
[email protected]: ~ $ ls -all /usr/local/bin/pip3                                                             [16:43:54]
lrwxr-xr-x  1 itkey  admin  35  4 24 08:25 /usr/local/bin/pip3 -> ../Cellar/[email protected]/3.9.4/bin/pip3

cut the weeds and dig up the roots

Now that the above reason analysis has shown that python3 and PIP3 in my path do not match, just modify them to match.

Put brew before the environment variable

#python3 Use brew
export PATH="/usr/local/Cellar/[email protected]/3.9.4/bin:$PATH"