I have a 64 bit machine with 64 bit Windows on one side and 64 bit Ubuntu 14 on the other. I am going through some exercises and notice that when I run the following command:
import sys
sys.maxint
I don’t get back the max int for a 64 bit machine and install I get the 32 bit max int. I’m a bit confused and do not know where to start. Maybe it is because I am using the Student License? Works just fine on the Ubuntu side.
The value of sys.maxint depends on the underlying C library. What you are seeing is expected behavior on Windows. See
Python sys.maxint, sys.maxunicode on Linux and windows
https://mail.python.org/pipermail/python-list/2008-December/504337.html
The question is a good one, but it could reasonably be marked as a duplicate by someone with sufficient "reputation". Please search before asking questions. Enjoy Python!
Related
I'm running Windows 7 Home Premium 64-bit. I need to install the perl
5.24 binary.
at http://www.activestate.com/activeperl/downloads I get two choices:
download activeperl 5.24.0 for windows (x86)
download activeperl 5.24.0 for windows (64-bit, x64)
Which of those two do I need?
Call me dense but I don't find my answer at How can I check whether my Perl installation is 32 or 64 bit?
whether-my-perl-installation-is-32-or-64-bit, although it does tell how to
display several version-related characteristics
perl -V:ivsize says
ivsize='8';
perl -V:archname says
archname='MSWin32-x86-multi-thread-64int';
perl -v says
This is perl 5, version 20, subversion 1 (v5.20.1) built for MSWin32-x86-multi-thread-64int
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2014, Larry Wall
Binary build 2000 [298557] provided by ActiveState
http://www.ActiveState.com
Built Oct 15 2014 22:10:49
Please help.
Phil
As your system is 64 bit. So I suggest you to install 64-bit, x64 one. You can install 32 bit also. 64 bit system support both 64 bit and 32 bit. But in case of 64 bit performance will be better.
As Arijit says, you should default to the 64-bit version as it will handle larger numerical values more efficiently and allows access to larger memory pools.
Exceptions include:
Your machine has less than 4GB of memory & you need to be stingy with what you've got.
You need to interface with a 32-bit only library on your computer for which you don't have access to a 64-bit version. I know of at least one ODBC driver that still fits this bill. Though for the customer that needs this I generally use perlapp to wrap up a dedicated 32-bit .exe file.
I am new to python, hoping to use it for scientific computation, data acquisition, etc. My ignorance is near total.
I am using a macbook pro, running OSX 10.9.5.
I first installed python 2.7, numpy, and matplotlib; can't remember where they came from. They seem to sit in /Library/Frameworks/Python.framework....
All was OK, until I realized I need scipy also. So, I installed the entire scipy stack from scipy.org, using 'sudo port install py27-numpy py27-scipy py27-matplotlib py27-ipython +notebook py27-pandas py27-sympy py27-nose', after having first installed xcode and the developer tools.
This new installation is located in \opt\local\var\macports\software...
Here's the question: When I run python in a terminal, it always defaults to the original installation. scipy, in particular, cannot be found. I suppose this is a path problem, but I am out of my depth here. Can someone help?
In my STS installation, I tried to upgrade Xmx1024 to Xmx4096. My computer computer has 8GB installed memory. But it keeps giving me an error message - "could not create java virtual machine" and exits with code 1. What could possibly be the problem and what should I do to fix it?
That's it: you're running a 32 bit JVM. I think you can't have more than 3GiB (or maybe 2GiB, I read by there) in a 32 bit JVM.
Can you try running a 64 bit JVM?
As they say in this article, you seem to be missing the unit.
Don't you want to write Xmx4096m?
I just got my first 64-bit Windows notebook. Now I'm looking for information when and why to use the 32 or the 64-bit versions of PowerShell or ISE.
My first impression is that I better stay with 32 bit, until I understand things better.
What I miss or didn't find are basic tutorials and practical experiences and links to this questions.
I'am working on a Seven 64Bits and W2K8 R2 for one year now, and, on the command line, I'am always using 64 bits Powershell without any troubles.
For me the problem is not to choose 32 or 64 Bit PowerShell.exe, but to know that the two exists, and that a 32 bits process will use the 32 bits PowerShell. For example if you use PowerShell as post build execution script in Visual Studio 2010, it will use 32 bits PoweShell because Visual Studio 2010 is 32 bits process.
The two versions see two differents places in the registry so you have to Set-ExecutionPolicy for both.
As scripting is concerned I do not use ISE, but PowerGUI script Editor. You can use
[intPtr]::size
in a script to know if you are runing 32 or 64 bits PowerShell.exe.
You would use the 64 bit versions of PowerShell or PowerShell ISE where the problem you are trying to solve is uniquely 64 bit. For example:
You need your PowerShell script to be able to consume more memory than a 32 bit application will allow
You are consuming libraries that are 64 bit only or need to run in a 64 bit environment. For example on Windows 2008R2/IIS7.5 if you are using the Microsoft.Web.Management managed wrapper, if you need to modify administration.config via this library then your application or script needs to run in a 64 bit process.
I typically stick with 64-bit PowerShell unless I have a good reason to not use it. One issue with 32-bit PowerShell is that you may accidentally find yourself in HKLM:\SOFTWARE\Wow6432Node location of the registry instead of where you think you are.
The example I've most-often come across for an explicit need for 32-bit is when using certain COM objects. For example, if you have a 64-bit OS, but 32-bit Office... If you want to instantiate a Word, Excel, or Access object, you're going to need to be in 32-bit PowerShell or else it's going to act as if you don't have Office installed at all.
When running SharePoint 2013, it's important to run the 64-bit versions when attempting to user the Windows.SharePoint.PowerShell snapin. I spent too much time not realizing I had open the 32-bit ISE not being able to load SharePoint Commands.
I think you don't really need to take care about that. As for my 64bit system, there is only a 32bit PowerShell preinstalled (in \system32) and it works without any issues. So just use it ;) And well, besides that, it's most likely the same case as with any other application: if you rely on functions/properties that are only available under 64bit you are better of to use the 64bit version of that application.
I'm trying to debug a .NET 3.5, 32 bit application running on Windows 7/64 bit with WinDbg. I'd like to use psscor2, but I can't load it. I can't load sos, either.
When I try to load psscor2, I get this error:
> .load psscor2
The call to LoadLibrary(psscor2) failed, Win32 error 0n193
"%1 ist keine zulässige Win32-Anwendung."
Please check your debugger configuration and/or network access.
When I try to load sos, I get this error:
> .loadby sos mscorwks
Unable to find module 'mscorwks'
My guess is that the 64bit version of WinDbg can't load 32 bit extension dlls like psscor2 and sos. But I couldn't find a download for the 32 bit version of WinDbg, or a 64 bit version of psscor2.
PS: I have (sort of) solved the problem: I installed the Windows 7 SDK in a 32 bit virtual machine, and copyed the 32 bit version of WinDbg from there to my development PC. But there has to be a easier way to do this!
If you want to debug a 32 bit application, you should use the 32 bit version of WinDbg and load the 32 bit version of SOS/PSSCOR2 even if you're on 64 bit Windows.
If you use the 64 bit version, you'll end up debugging the Wow64 process, which means you must go through some additional loops to be able to debug the application as a 32 bit process. If you must do this for some reason, you need to load the wow64exts extension as well and switch to 32 bit mode using the !sw command. Even if you do this there are some issues with using the 64 bit version with a 32 bit application, so I recommend that you use the 32 bit version of WinDbg.