Jump to content


P4Python Windows Install Error

P4Python Windows 64Bit Python 2.7

  • Please log in to reply
12 replies to this topic

#1 toby.rutter

toby.rutter

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 11 March 2014 - 03:28 PM

Hello Perforce Forums

I've been trying to install P4Python module on a Windows 7 64 Bit machine and I'm being met with an install error

There was a problem trying to get the P4Python install path.

Possible reasons are:
1) Python is not installed.
2) An unsupported version or architecture of Python is installed.
3) The folder containing the Python executable is not in the system path.
4) Another version or architecture of Python is in the system path.
5) The P4Python install paths are not writable.

I've seen one or two other forum posts asking this question but neither had any kind of solution I could apply.

I'm tried using  the 3 most recent versions of P4Python windows installer, all of which resulted in this error. I want to use one of the Python 2,7 installers because I'm going to be using P4Python to write integration for Autodesk Maya 2014 which is using the same version of python.

I can rule out 1,2,3 from the possible reasons. I can't see any other versions of Python in the system variables so I'm pretty sure the problem isn't number 4.

I don't get far enough into the installer to see where the P4Ppython install path is so I can't comment on whether that path is writable or not.

It's working mentioning I am running a dual hard drive machine, my python 2.7 path is directed to the D drive and perforce is also installed on this drive. I am using a 64 bit install of perforce

Any advice would be greatly appreciated.

#2 P4Matt

P4Matt

    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 11 March 2014 - 08:22 PM

Where did you get your Python from? Frequently it's not the version of Python used, but the compiler, that causes the problem.

#3 toby.rutter

toby.rutter

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 12 March 2014 - 09:11 AM

I did a clean install of python 2.7.6 from the Python website yesterday rather than rely on the default version that comes installed inside to the Maya directory. My system python path is directed towards the 2.7.6

#4 P4Matt

P4Matt

    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 12 March 2014 - 07:19 PM

32-bit or 64? I want to make sure I get the exact same version as you.

#5 toby.rutter

toby.rutter

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 12 March 2014 - 07:33 PM

The 64 bit version, thanks for the help

#6 P4Matt

P4Matt

    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 13 March 2014 - 12:29 AM

That explains it. The installer build of P4Python is done with Visual Studio 2010; the Python.org build is built with mingw. You have to build your own P4Python using mingw. The source is available from the FTP site:

http://ftp.perforce....13.1/bin.tools/

I've put in a request for the installer to either optionally include a mingw build, or for us to swap the mingw build into the installer, but I have no timeline for that change. In the meantime I'm going to reach out to the P4Python dev and see if he can whip up an installer; he's done custom builds of his own for a couple years.

#7 toby.rutter

toby.rutter

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 13 March 2014 - 11:17 AM

Thanks Matt, I'm a bit clueless when it comes to building from source if you could reach out to the P4Python Dev that would be incredibly appreciated

#8 P4Matt

P4Matt

    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 13 March 2014 - 07:21 PM

Yup, I've reached out. Sven loves his P4Python, so between the two of us we can get this sorted; probably will take a couple days.

#9 P4Matt

P4Matt

    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 15 March 2014 - 12:09 AM

Oye ve. So we only have 32-bit builds of the Perforce C++ API using mingw, which makes it impossible for me to build a mingw-64 P4Python. I'm going to need to work with our build team on this; we'll need a new API build. It's going to take more than a couple days; any chance you can use 32-bit Python?

#10 toby.rutter

toby.rutter

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 15 March 2014 - 08:28 AM

Hi Matt, thanks for the reply, I'll try setting it up with 32 bit Python. I don't have perforce on my home machine so I'll test it first thing on monday morning

#11 P4Matt

P4Matt

    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 24 April 2014 - 10:50 PM

So I have learned that I'm sadly horribly mistaken; Python.org uses Visual Studio 2008 for their builds. Our installers are setup to only support Python 3.

The good news is that one of our consultants has built an installer for 32-bit Python 2.7 builds. You can grab it here:

https://swarm.worksh...2-py2.7.exe?v=1

I just used it and it worked like a dream. Sorry for misleading you with the mingw tangent.

#12 jaguillon

jaguillon

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 04 October 2014 - 12:38 AM

I am running the 64bit version of Python 2.7.8 from python.org on Windows 7.  Is there a version of P4Python that I can use?  The one I downloaded from Perforce seems to indicate it is for Python version 3.3, and I get the error that was originally reported at the start of this thread.

Thanks,

#13 micah.turner

micah.turner

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 13 February 2015 - 05:56 PM

I am using python 3.4 and get the error mentioned in this post when trying to install. Trying to get this working in a django site.

I know my path and everything is good, I suspect what's happening is that this installer is just not built to support 3.4 yet?

Is there another way to install p4python on windows 7 64-bit using python3.4 directly from python.org

Thanks,
-MT





Also tagged with one or more of these keywords: P4Python, Windows, 64Bit, Python, 2.7

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users