I have both wamp and python on a single machine. For very specific reasons PHP needs to use the 64bit version of oracles instaclient and python needs to use the 32bit version. My Path variable points to the 64bit version. This is obviously no good for my 32bit Python.
Is there a way I can point python cx_oracle to look specifically at the 32bit version of instantclient.
You can start your script by setting the environment variables correctly. For example, if you run your script from command line like this and set the environment variables, it should work as expected. Bu do not forget to remove 64bit instant client path from %path%, I just put this as an example. Just add your paths as semicolon seperated, or you can create a python script removing/changing the environment variables and starting your application.
C:\Windows\System32\cmd.exe /c "set ORACLE_HOME=D:\oracle && PATH=%path% && yourscript.py"
Your second option is to copy the instant client files to your application working directory.
Related
I was going through this appdynamics document page for the installation of C/C++ SDK.
C/C++ SDK installation on Linux
But since, i am doing this for the first time, i am not sure what is meant in the 3rd point.
I think i have to set the location in my LD_LIBRARY_PATH env variable and then invoke them by typing
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/appdynamics-cpp-sdk/lib
Can somebody explain, what needs to be done?
Yes - you need to set "/opt/appdynamics-cpp-sdk/lib" in your "LD_LIBRARY_PATH" environment variable to use the SDK as you have posted.
Generally this is put in a script used to build your application which you are wanting to instrument.
I want to use C ++ to confirm local windows system python version installed, I do not know How to determine?
If the python directory has been added to the PATH environment variable, you can easily _popen python with the --version argument, and parse out the version number from the standard output (which will be e.g. Python 2.7.6).
Another option would be to use regedit to see if the version appears somewhere in the registry that you can read it from. Lots of existing S.O. Q&A on how to read registry values....
If you get stuck implementing either option, post your code and the specific problem.
I'm on 64-bit Windows 7 with 64-bit Python 2.7 and gsutil version 4.11
I'm trying to set up gsutil so that I can run it from the windows command prompt with the commands python gsutil or gsutil. I'm referring to the documentation here in the section called "Facilitating the use of gsutil"
According to that documentation and other references in that guide, I should be able to set up gsutil to run by using either python gsutil or just gsutil. I am able to run gsutil by cd-ing to the C:\gsutil directory or by running python C:\gsutil\gsutil, which will work fine, but I'd like to set it up the way the guide says it can be set up. I've looked at this answer but it just explains what I already can do.
The first step of the guide is associate .py files with Python, which I'm assuming is already done because when I double click a .py file, it runs in Python, but maybe I'm confused.
The second step of the guide is to rename the 'gsutil' file to 'gsutil.py', but that doesn't make sense because there's already a file in the C:\gsutil folder called gsutil.py. I've opened both the files in Sublime Text and they're both different, so maybe they do the same thing but I'm not sure...
The third step is to add C:\gsutil to my PATH environment variable, but I'm still unable to run gsutil using the command python gsutil after doing that.
I've also tried steps 4 and 5 but they don't help me either. There is no gsutil\boto path (unless they mean C:\gsutil\third_party\boto) and I should be able get this set up without anything to do with boto anyways.
I can still use gsutil but I'd like to understand why I can't run it the way Google says I should be able to. Thanks for any help.
I'm looking at the docs for Windows and they do seem a bit messed up. You don't need to rename anything as long as you have installed Python correctly, as you can just invoke 'gsutil.py' from anywhere as long as 'C:\gsutil' (or wherever you installed it) is in your path. The 'gsutil' script is just another Python wrapper that imports 'gsutil.py', which would work on a Unix system to save typing the extension if it was in your path but not on Windows (Windows needs a file extension to associate the type). I'd recommend just installing the Google Cloud SDK using the Windows installer as it installs gsutil properly along with a 'gsutil.cmd' wrapper for Windows which actually does this properly.
You could only ever run 'python gsutil' from inside the installation directory as Windows path rules would never apply to a filename given as an argument to another command.
If you just want the functionality of typing 'gsutil' as it is supposed to work, the 'gsutil.cmd' script essentially does this (substituting with the actual directories where you installed stuff):
cmd.exe /C C:\Python27\python.exe "C:\gsutil\gsutil.py" %*"
I'm trying to install MinGW distro following the steps here: http://nuwen.net/mingw.html#install
But, when I try to run: gcc --version
at my command line I get the following:
'gcc' is not recognized as an internal or external command,
operable program or batch file.
Why is that?
Thanks.
You need to set up your PATH environment variable so that the command interpreter finds the gcc program.
E.g. (since you’re working in the Windows [cmd.exe] command interpreter)
set path=%path%;%programfiles%\mingw\bin
You have to use the path that applies to your system and your installation of the compiler.
You can set up a more permanent path via the Environment button in the System applet in the Control Panel. You can also do it more low level via the registry (e.g. command regedit). And in other ways.
By the way,
for C++ programming use g++, do not use gcc directly.
At least if you want to avoid trouble. Of course you can do manually what g++ does. But much easier to use g++; that’s what it’s for.
Cheers & hth.,
The command prompt cannot find the program 'gcc'. It's most likely because you have something wrong with the environment variable. If the pathname given in the environment variable is at all incorrect or non-existent (if you have the folder in another place), then command prompt will not be able to find it.
I came from gnu/linux world but recently I must to work on a windows system and I want to be able to compile my c/c++ console programs on it. The problem is I don't have administrative privilegies to install anything.
I looked for portable apps. I'd find gvim and mingw but I don't know how to make them work together on a flash drive. I'd found also a vim plugin called msysportable that's supposed to do the job but I don't know how.
So my question is: how can I make a portable windows c/c++ development environment using gvim?
(don't tell me to use code::blocks or visual studio, I've this installed but I want vim)
copy your development environment to your flash-drive. Create a batch file to setup environment variables for paths to include dirs ,lib dirs ,executables ,etc. Then use this environment in cmd session with console commands. If you have installed MSVC on your own system then there is a batch-file called vcdirs.bat thar does this on youre system, Take it as example how to make a portable environment. By the way ,INSTALLING youre tools at a vlient-site may be a license violation. The portable environment is not as long as you do not install it.