I was an idiot and put ffmpeg into the PATH thing alone instead of using the ;, and now my cmd can only do dir and ffmpeg. How do I fix this? What do I set the PATH variable to? Please help, my discord bot is screwed up because it doesn't have node.js working.
You can use the below paths:
C:\Tools\Python\Scripts\;C:\Tools\Python\;C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Tools\SysinternalsSuite\;C:\Program Files\CVArchiverAddin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\nodejs\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\dotnet\;
Related
I am working on a object detection project and wanting to process the project with my GPU. I have completed the NVIDIA setup tutorial and everything works fine. My object detection code originally works with the CPU, however when I add these two lines of code:
net.setPreferableBackend(cv2.dnn.DNN_BACKEND_CUDA)
net.setPreferableTarget(cv2.dnn.DNN_TARGET_CUDA)
the output displayed:
Could not locate zlibwapi.dll. Please make sure it is in your library path!
I have downloaded the zlibwapi.dll zip file stated from the cuDNN website, unzip and added the whole folder into my environment variables paths. The folder is called "zlib123dllx64" containing a "dll_x64" folder and a "static_x64" folder. The "zlibwapi.dll" is inside the "dll_x64" folder. I have added the "zlib123dllx64" folder in the user and system path variable but it doesn't seem to fix any of the problems. How can I fix this error and make the GPU work with the code?
My environment setup:
Windows 10
Visual studio community 2019
OpenCV Python yolov3
Windows Environment:
I faced this issue of "Could not locate zlibwapi.dll. Please make sure it is in your library path" when I am trying to run a TensorRT sample, int8_caffe_mnist. To confirm proper installation of TensorRT.
Following the instructions from: https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#prerequisites-windows
Under 3.1.3 download zlib and add the path to the environment variables.
I did the following:
Windows search for Edit the system environment variables
Add library path, Environment Variables -> Path -> Edit -> C:path to\zlibwapi.dll
Conclusion:
Following the instructions for adding zlibwapi.dll to the path did not work for me.
Solution that worked for me:
Removed the library path under Environment variables
copied zlibwapi.dll to C:\Windows\System32 and C:\Windows\SysWOW64
Either delete/keep zlib123dllx64 file, I choose to delete as it does not need the location to library path
I was able to find a copy of the missing zlib DLL in the NVIDIA Nsight directory:
C:\Program Files\NVIDIA Corporation\Nsight Systems 2022.4.2\host-windows-x64\zlib.dll
I copied and renamed it to:
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin\zlibwapi.dll
since that was already in my PATH environment variable. Doing that resolved my error.
I saw the link in the CUDNN documentation that was linked in the other answers, but I was a little concerned by the security warnings.
Stumbled across this problem too and there is an easy fix that immediately worked for me:
Check out Nvidia's page (exact link where to download) and download.
Extract the files and simply find the single file "zlibwapi.dll". Copy this file to
C:/path to/NVIDIA GPU Computing Toolkit / CUDA/ v11.X / bin -> right here in that folder
Just did those two steps and it's TF can properly use GPU.
Download and extract the zlib package from http://www.winimage.com/zLibDll/zlib123dllx64.zip for 64 bit windows then copy the zlibdll file into cudnn/bin
If anyone also got the same problem as me, I managed to fix the problem. Instead of calling the whole "zlib123dllx64" folder into the system environment path, you simply just add the "zlibwapi.dll" inside the "dllx64" folder into your project folder and include it in your project. This fixed my problem. cheers
Didn't find zlibwapi.dll in bin but solved it anyhow.
Since I didn't have it in
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\
I couldn't change environment variable but I found it elsewhere.
mhartlove suggested here:
https://forums.developer.nvidia.com/t/could-not-load-library-cudnn-cnn-infer64-8-dll-error-code-193/218437/17
Solution:
"I found a copy of the 64 bit zlibwapi.dll hiding under a different name in:
C:\Program Files\NVIDIA Corporation\Nsight Systems 2022.4.2\host-windows-x64\zlib.dll
I copied and renamed it to:
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin\zlibwapi.dll
since that folder is already in my PATH variable; and it worked. Turns out the CUDA Toolkit already has the file you need elsewhere. Seems like they could save a lot of trouble if they just made a change to the CUDA Toolkit installer.
"
I downloaded the dll file from https://www.dllme.com/getfile.php?file=38308&id=9b45296e316cdf31b9bace739e22ca7a
Extracted it
see here
renamed
zlibwapi_x64.dll -> zlibwapi.dll
and pasted it in the bin of my CUDA
Look at the last file
This worked for me....
I've tried to extract certain country from the world shp file from natural earth.
I am currently using windows 10, so I installed python 3.7, gdal to use the ogr2ogr.
I typed the below code in the command to extract the south korea
ogr2ogr -f GeoJSON -where "geonunit='South Korea'" korea-geo.json
ne_10m_admin_1_states_provinces.shp
But the below errors are coming out.
ERROR 1: PROJ: proj_create_from_wkt: Cannot find proj.db
ERROR 1: PROJ: proj_identify: Cannot find proj.db
I already set up the environmental variables for Gdal..
C:\Program Files\GDAL\gdal-data
C:\Program Files\GDAL\gdalplugins
Please guide me to solve this problem.
Check your environment_variable:
setx GDAL_DATA "C:\Program Files\GDAL\gdal-data"
setx GDAL_DRIVER_PATH "C:\Program Files\GDAL\gdalplugins"
setx PROJ_LIB "C:\Program Files\GDAL\projlib"
setx PYTHONPATH "C:\Program Files\GDAL\"
Adding PROJ_DEBUG=3 to your environment_variable is very useful. The error message will then tell you where PROJ is expecting the file.
You might need to set the PROJ_LIB environment variable. But I'm not sure where that data lives on your system. It could also be affected by how you installed GDAL.
If you go into your C:\Program Files\GDAL directory, do you have a folder called proj? If so, see if it has proj.db file in it. If it does, that's your PROJ_LIB path value. You might also find it in some kind of share folder.
If you don't find it nested somewhere in your GDAL directory, try searching your system for the proj.db file, and ,if you find it, set that directory (NOT the full file path) as your PROJ_LIB value, reboot, and see if things start working.
Add these commands to your code at the beginning before importing GDAL. Your issue will be solved.
import os
os.environ['PROJ_LIB'] = 'C:\\Users\\Sai kiran\\anaconda3\\envs\\sai\\Library\\share\\proj'
os.environ['GDAL_DATA'] = 'C:\\Users\\Sai kiran\\anaconda3\\envs\sai\\Library\\share'
import gdal
Search for the location of your proj.db file in your anaconda directory and replace the same location with C:\\Users\\Sai kiran\\anaconda3\\envs\\sai\\Library\\share\\projin the above command. Also, replace the location of gdal folder in the anaconda directory as in the above example.
Jenkins script in the cache gives the following error
C:\Users\svcBICM\AppData\Local\Temp\jenkins6041485005934862737.sh:
line 16: C:\Program: No such file or directory
I am running the above in Windows. The previous node path was is c:\root\nodejs which was working and the current path is in c:\Program Files\ .
So I am getting the following error since maybe the jenkins is taking c:\Program as one string and Files\ as another one. Is there any way to fix this? The above jenkins script is not created by me , but you can say its auto-generated and not available to view when i go to the location.
Any help would be appreciated.
As Rohit already said, you can fix the issue just by using double quotes: "c:\Program Files\".
Because I was having problems, I opened a command window and changed to the very bin directory where ant was installed. Then I entered 'ant -version'. It returned:
Files\Java\jdk1.8.0_72"" was unexpected at this time.
Entering 'ant' alone gives the same message. The JAVA_HOME is set to the jdk folder (jsk1.8.0_72), and the PATH adds \bin to it. Nothing else appears broken.
Any ideas gratefully received. Thank you.
Since writing the above, I tried shifting to 32-bit jdk7 from 64-bit jdk8. Output from "ant --version" changed a bit to: Files was unexpected at this time.
Changing the Symlinks in C:\ProgramData\Oracle\Java\javapath did nothing good.
Output of "set | findstr /b /i //"java_home=//"" is:
JAVA_HOME="C:\Program Files (x86)\Java\jdk1.7.0_79"
For PATH=, the output is too long and characters could be missed, so instead I ran: echo %PATH% > d.txt. Here is the result:
C:\Program Files\Everything;C:\Program Files\gradle-2.8\bin;"C:\Program Files (x86)\Launch4j";C:\Program Files (x86)\Apache\apache-ant-1.9.6\bin;"C:\Program Files (x86)\Java\jdk1.7.0_79"/bin;C:\cygwin64;C:\cygwin64\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Windows Resource Kits\Tools\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\curl;C:\Devkit\bin;C:\Ruby21-x64;C:\Ruby21-x64\bin;C:\Perl64\site\bin;C:\Perl64\bin;C:\Program Files (x86)\Apache\apache-ant-1.9.0\bin;"C:\Program Files (x86)\Java\jdk1.7.0_79"\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files (x86)\GNU\GnuPG\pub;C:\Program Files (x86)\WinMerge;C:\Program Files (x86)\Bazaar;C:\Program Files\jEdit;C:\Program Files (x86)\Groovy\Groovy-2.1.7\bin;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files (x86)\Calibre2\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\CMake\bin;C:\Program Files (x86)\mingw-w64\i686-4.9.2-posix-dwarf-rt_v4-rev2\mingw32\bin;C:\Program Files (x86)\Scite\scite\bin;C:\Program Files (x86)\nodejs\;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Tcl\bin;C:\Program Files (x86)\Arduino\hardware\tools\avr\bin;C:\Program Files\dbd\Beard;C:\Program Files\dbd\dd;C:\Users\dbd\AppData\Roaming\npm
Please note that all the Java Demos run OK, suggesting that the basic java installation is OK.. Have not yet looked at the Registry. All of this is mysterious and upsetting.
Thanks to Stefan De Laet and Chad Nouis. More to be done.
This entry in your PATH doesn't look quite right:
"C:\Program Files (x86)\Java\jdk1.7.0_79"/bin
Those quotation marks shouldn't be there. Also, the forward slash before bin should be replaced with a backslash:
C:\Program Files (x86)\Java\jdk1.7.0_79\bin
Next, the JDK directories appear twice in your PATH:
...;"C:\Program Files (x86)\Java\jdk1.7.0_79"/bin;...;"C:\Program Files (x86)\Java\jdk1.7.0_79"\bin;...
Only one JDK directory is necessary. I recommend deleting the second entry.
Further, your JAVA_HOME also shouldn't have quotation marks. The following...
JAVA_HOME="C:\Program Files (x86)\Java\jdk1.7.0_79"
...should be...
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_79
At long last and finally, 'ant -version' gets the correct response: "Apache Ant(TM) version 1.9.6 compiled on June 29 2015". I beiieve several things contributed to the success:
Switching from 64-bit to 32-bit java. Since Ant comes as a zip file, I could not discover whether it is really 64-bit or 32-bit. I did find it in my 32-bit folder, but that could be a holdover from earlier times. But maybe not.
fixing the PATH. The PATH which I sent was an end-result after substitution composed of a replacement for the following: "...%JAVA_HOME%/bin...". Normally, I would have spotted it, but because of the %, I did not. Thank you Chad Nouis! When I switched to 32-bit, I did not touch the PATH entry, but merely changed JAVA_HOME. This may have been in the system for some time.
Oh Well! Have a good day everyone and thanks again!
I'm trying to use Karma for testing my js scripts. In the doc it says I should set the environment variable for CHROME_BIN:
I've set it to
%programfiles(x86)%"\Google\Chrome\Application\Chrome.exe
but when I type %CHROME_BIN% in DOS, it fails as it's truncated to C:\Program of the space in Program Files.
What can I do to work around with this problem?
Was facing the same issue and I solved it by editing the karma.conf.js and karma-e2e.conf.js files which is under config directory.
Change:
browsers = ['Chrome'];
TO
browsers = ['Your_System_Path_where_chrome_installed/chrome.exe'];
in my case it was > C:/Program Files (x86)/Google/Chrome/Application/chrome.exe
and then add C:\Program Files (x86)\Google\Chrome\Application\chrome.exe path to environment variables
or in cmd
SET CHROME_BIN = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
Additional: Settings for other browsers can be seen here.
And about why chrome one is not working I guess they(Karma) have configured their chrome path from some earlier versions of chrome.
Update: For AngularJS tutorial Followers:
You still might face problems (as I faced) while running karma test runner on some tutorial steps and to resolve this: just add these "Angular Scenario Dependencies" in both the "...conf.js" files, like this:
files = [
ANGULAR_SCENARIO,
ANGULAR_SCENARIO_ADAPTER,
....
.... // keep rest of the lines as it is
....
];
In Powershell you can run the following command:
$Env:CHROME_BIN = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
You need to replace the stuff within the double quotes with your local path.
Or in cmd.exe
SET CHROME_BIN = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
This is all you would need to get it going.
I have solved the same issue by setting CHROME_BIN in my environment properties like this:
c:/Program Files (x86)/Google/Chrome/Application/chrome.exe
There have to be no double quotes (") around the property value and all backslash signs (\) have to be replaced by slash signs (/)
For Chromium in ubuntu 14.04 edit test/karma.conf.js and change
browsers = ['Chrome'];
for
browsers = ['chromium-browser'];
I've found that installing Canary and changing browsers = ['Chrome']; to browsers = ['ChromeCanary']; is nicer.
I solved the problem by running from an Administrator Command Prompt. No need to set CHROME_BIN and it will automatically point to your default installation.
Use set (see http://ss64.com/nt/set.html) and place the quotes around the entire string
"%programfiles(x86)%\Google\Chrome\Application\Chrome.exe"
(In Linux) I thought it was related to CHROME_BIN but in the end for me it had nothing to do with that variable and i removed it. I had to lookup the karma-chrome-launcher npm plugin on github and follow the instructions for adding no security to my karma config.