ERROR virtual machine in GitBash

I am trying to configure virtualenvwrapper on GitBash (Windows 7). I am writing the following lines: 1 $ export WORKON_HOME=$HOME/.virtualenvs 2 $ export MSYS_HOME=/c/msys/1.0 3 $ source /usr/local/bin/virtualenvwrapper.sh

And the last line will give me an error: source /usr/local/bin/virtualenvwrapper.sh sh.exe: /usr/local/bin/virtualenvwrapper.sh: No such file or directory

I find where on my drive virtualenvwrapper.shand change the directory name. On my computer, this /c/Python27/Scripts/virtualenvwrapper.sh. When I run the command again

$source /c/Python27/Scripts/virtualenvwrapper.sh

I get the following ERROR message: sh.exe":mktemp:command not found ERROR: virtualenvwrapper could not create a temporary file name

I check my environment variable: C:\python27\;C:\python27\scripts\;C:\python27\scripts\virtualenvwrapper.sh\;C:\msys;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\Git\bin\

I do not know where I was wrong

+4
source share
2 answers

The error says that sh.exe (shell) cannot find the command corresponding to mktemp, which means that it is absent in GitBash, at least not in your environment.

- mktemp Windows, ​​ http://gnuwin32.sourceforge.net/packages/mktemp.htm, C:\Program Files (x86)\Git\bin. mktemp .

+1

Windows 8 GitBash.

TL; DR:

mktemp Windows, -, GitBash, virtualenvwrapper.sh 202 touch . :

file="$(virtualenvwrapper_mktemp -t virtualenvwrapper-$suffix-XXXXXXXXXX)"
touch $file  # this is the new line
if [ $? -ne 0 ] || [ -z "$file" ] || [ ! -f "$file" ]

:

khampson, mktemp Git\bin (C:\Program Files (x86)\Git\bin). virtualenvwrapper.sh :

path = C:/Users/User/AppData/Local/Temp/virtualenvwrapper-initialize-hook-XXXXXX XXXX 
lpPathBuffer = C:\Users\User\AppData\Local\Temp\ 
szTempName = C:\Users\User\AppData\Local\Temp\tmp23A9.tmp 
path = C:\Users\User\AppData\Local\Temp\tmp23A9.tmp 
fd = 3 
ERROR: virtualenvwrapper could not create a temporary file name.

202 (source) virtualenvwrapper_mktemp ( - mktemp), , , , .

mktemp, , - , .

, , , virtualenvwrapper.sh:

file="$(virtualenvwrapper_mktemp -t virtualenvwrapper-$suffix-XXXXXXXXXX)"
touch $file   # new command here

. - , , -.

virtualenvwrapper, . , .

+1

Source: https://habr.com/ru/post/1546491/


All Articles