C:\Users\stc>cxxtestgen --version python: can't open file 'C:\\Users\\stc\\cxxtestgen': [Errno 2] No such file or directory - cxxtest

When i install cxxtest then it installed successfully . but when i check its version on cmd it show that python can't open file no such directory. I have installed python also. I add the path also after them this type of error came.

Related

Build kustomize 3.2.0 on Windows

Can someone suggest how to install 3.2.0 version of kustomize on Windows, please?
I need specifically v3.2.0 on Windows. I am following this tutorial.
Source code: https://github.com/kubernetes-sigs/kustomize/releases/tag/v3.2.0
I downloaded the zip file and installed Go. However when I run go install . inside that kustomize folder i get: no Go files in path/kustomize/..
Also tried step by step aforementioned tutorial but same error..
EDIT: Trying to install via https://github.com/kubernetes-sigs/kustomize/blob/master/hack/install_kustomize.sh ./install_kustomize.sh 3.2.0 I get: Version v3.2.0 does not exist.
When I try ./install_kustomize.sh 3.2.1 I get:
tar (child): ./kustomize_v*_windows_amd64.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
Env: Windows 10, executing in GIT Bash
You'll need to run go install ./cmd/kustomize/.
That is where the main.go is you want built.
This will install the executable in your %GOBIN%.
You might want to use go build -o kustomize.exe ./cmd/kustomize/ instead to get the executable in your current working directory.

How to write a Python 3 script to do .\activate in Windows 10 OS?

I'm trying to write a script to activate the virtual environment under a path, which is doing the same thing as the following command line:
cd C:\go\to\my\venv\path\Scripts
.\activate
My idea is first to change the directory to my Scripts folder, then execute the .\activate file. The problem is I have tried
1. os.system(".\\activate") #".\activate" is an error
2. subprocess.run(".\\activate")
3. subprocess.call(".\\activate")
4. subprocess.Popen(".\\activate", shell=True)
but all failed, and because I'm new to Python 3, so any suggestion will be appreciated, thanks.
Update 1:
Right now, it seems like can install one package successfully, but I have a list of packages need to install and I will figure it out how to do it. When I print out os.getcwd() after I activated the venv, there is no (venv) as the prefix in the result, so I don't know if the package was installed under venv or not?
Update 2:
Now, my problem is I'm using from pip._internal import main as pip
pip(['install', package_name])
It only can install one package successfully, if I pass a list of packages and use for loop to install them then they will fail. The error will be
Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\Users\BO7D71~1.CHE\AppData\Local\Temp\pip-req-tracker-1nc0ofuc\5fc2bc8999692b42fb54fd13e7cbdf5f855b9718f5363d30a270bbe1'
Update 3:
Problem solved!

Can't import on Windows/Anaconda

Windows 10, Anaconda 2 or 3
c:\leo.repo\leo-editor>c:\apps\Git\bin\git.exe --version
yields:
git version 2.8.2.windows.1
sys.path contains C:\apps\Git, C:\apps\Git\bin and C:\apps\Git\cmd, but I am getting the dreaded GitCommandNotFound exception. What am I doing wrong?
Executing:
from git import Repo
yields:
[snip]
File "c:\Anaconda3\lib\site-packages\git\cmd.py", line 602, in execute
raise GitCommandNotFound(command, err)
git.exc.GitCommandNotFound: Cmd('git') not found due to: FileNotFoundError('[WinError 2] The system cannot find the file specified')
cmdline: git version
Edward
It appears that installs are different on Anaconda.
Per this page the proper installation procedure is:
conda install -c conda-forge gitpython=2.1.1
Installation on Python 2 was straightforward.
Update: I had to add the following to sys.path for Python 3:
C:\Anaconda3\pkgs\gitdb-0.6.4-py35_1\Lib\site-packages
I have no idea why python 2 installs in site-packages as expected, while python 3 installs in the path shown above.
Update2: I also had to update the Windows PATH variable (not just sys.path) to point to the directory containing git.exe.

OSError: No such file or directory: '[virtual environment]/..local/lib/python2.7/site-packages/[package-name]-0.1-py2.7.egg'

I am creating an PYPI application(to install using pip). I built it using command "python setup.py build" and installed in local machine(inside virtual environment. using [ubuntu 12.4]). whenever I try to UN-install using "pip uninstall " it gives the following error.
Message displayed while installing it
Copying fantain_DBC-0.1-py2.7.egg to /home/kavin/.virtualenvs/pavan_pkg/lib/python2.7/site-packages
Adding fantain-DBC 0.1 to easy-install.pth file
Installed /home/kavin/.virtualenvs/pavan_pkg/lib/python2.7/site-packages/fantain_DBC-0.1-py2.7.egg
Processing dependencies for fantain-DBC==0.1
Finished processing dependencies for fantain-DBC==0.1
Blockquote
Error message while uninstalling
OSError: [Errno 2] No such file or directory: '/home/kavin/.virtualenvs/pavan_pkg/local/lib/python2.7/site-packages/fantain_DBC-0.1-py2.7.egg'

Build R source code from windows

C:\Work\R contains the R-3.1.1.tar.gz file
I have build R source(R-3.1.1) in windows 8 from the following commands
cd C:\Work\R
tar --no-same-owner -xf R-3.1.1.tar.gz
cd C:\Work\R\R-3.1.1\src\gnuwin32\
make all recommended
Add the following path to the Environment variables
C:\Work\R\R-3.1.1\bin\i386
Enter the R.exe in command promt
I got the following Error
Fatal error unable to open the base package
System information
Windows 8, 64 bit operating System, x64 –based processor
How to resolve this error?
If you are using R, you can download the newest version from here and then simply install it.
If you have an older version and want only to download the new one, use those commands inside R:
# installing/loading the package:
if(!require(installr)) {
install.packages("installr"); require(installr)} #load / install+load installr
# using the package:
updateR() # this will start the updating process of your R installation. It will check for newer versions, and if one is available, will guide you through the decisions you'd need to make.
We can resolve this issue by using the following command before build the R source code
Set TMPDIR=c:\cygwin64\bin
Here c:\cygwin64\bin is the cygwin installed location in Windows 8 machine.
Here I have mentioned the R source code build steps:
Install cygwin setup
Install RTools
Create the R_HOME file in the directory like C:\R_HOME
Place the R source code tar file in the R_HOME
Add the following path in environment variable in first
c:\Rtools\bin\;c:\Rtools\gcc-4.6.3\bin;C:\cygwin64\bin\;C:\Program Files (x86)\HTML Help Workshop\;C:\R_HOME\R-3.1.1\bin\;
Enter the following command in the command prompt
Set TMPDIR=C:\cygwin64\bin
Set working directory as C:\R_HOME
Enter the following command
tar --no-same-owner -xf R-3.1.1.tar.gz
Copy the Tcl source from c:\R (it will be created while installing RTools)
Set the working directory as follow in command prompt
C:\R_HOME\R-3.1.1\src\gnuwin32
Enter the following command
Make all recommended
Enter the R.exe command in command prompt. We can enter the R terminal

Resources