Jump to content


Error while installing P4Python on windows

P4Python perforce

  • Please log in to reply
9 replies to this topic

#1 pratik

pratik

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 10 September 2014 - 02:02 PM

Configuration:

Machine: windows8 64-bit
Pyhton 2.7
Environment variable:
PATH: %PATH%;C:\Python27
PYTHONPATH: C:\Python27;C:\Python27\Lib;C:\Python27\DLLs;C:\Python27\Lib\lib-tk;

While installing P4Python 2.7 i got following message:

There was a problem tying 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 before the supported version of architecture.
5) The P4Pyhton install paths are not writable.

I also tried installing P4Python 3.3 and got same message ?

How to solve this error ?

#2 P4Matt

P4Matt

    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 10 September 2014 - 04:11 PM

Try this installer from one of our consultants and see if it works better.

https://swarm.worksh...win32-py2.7.exe

I believe the installer from our main site only work with P64-bit Python 3.3.

#3 pratik

pratik

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 11 September 2014 - 05:46 AM

Thanks P4Matt.

That .exe worked for me.

Please give link to this .exe on Perforce site so that others can easily find it.

#4 pratik

pratik

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 11 September 2014 - 01:03 PM

By mistake i uninstalled python and the again installed it and then installed P4Python exe given by you.

It installed successfully but on running following code:


from P4 import P4,P4Exception # Import the module
p4 = P4() # Create the P4 instance
p4.port = "p4training.us.sony:1666"
p4.user = "pratik.prajapati"
p4.client = "wks_3" # Set some environment variables
try: # Catch exceptions with try/except
	p4.connect() # Connect to the Perforce Server
	info = p4.run("info") # Run "p4 info" (returns a dict)
	for key in info[0]: # and display all key-value pairs
		print key, "=", info[0][key]
	print "labels = "
	la = p4.run("labels", "//my_depot/...") # Run "p4 edit file.txt"
	print la
	p4.disconnect() # Disconnect from the Server
except P4Exception:
	for e in p4.errors: # Display errors
		print e 

And gave following message:

C:\Python27\python.exe "C:/d drive/perforce_workspaces/wks_3/sony/tools/tag_test/MAIN/pure/temp_release.py"
Traceback (most recent call last):
  File "C:/d drive/perforce_workspaces/wks_3/pure/tools/tag_test/MAIN/sony/temp_release.py", line 1, in <module>
	from P4 import P4,P4Exception # Import the module
  File "C:\Python27\lib\site-packages\P4.py", line 376, in <module>
	import P4API
ImportError: DLL load failed: %1 is not a valid Win32 application.


#5 rhummer

rhummer

    Advanced Member

  • Members
  • PipPipPip
  • 87 posts
  • LocationMadison, WI

Posted 11 September 2014 - 01:20 PM

Might try re installing P4Python or redownloading it.  That error seems to indicate the dll is corrupt.
Lead Tools Engineer
Raven Software

#6 pratik

pratik

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 11 September 2014 - 02:11 PM

Installing P4Python .exe after redownloading says:

Python version 2.7 required but is not in the registery.

I have already installed Python 2.7.7

#7 P4Matt

P4Matt

    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 11 September 2014 - 08:09 PM

Let's see your Python version string. I suspect you now have 64-bit Python, which requires a different build of P4Python.

#8 pratik

pratik

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 12 September 2014 - 05:08 AM

Yes, i checked its 64-bit python. Please give me link of 64-bit P4Python.

#9 brent

brent

    Member

  • Members
  • PipPip
  • 13 posts

Posted 12 September 2014 - 08:51 AM

You know, I've got a version of the 64 bit P4Python windows exe. I've put it on your companies intranet........

#10 P4Matt

P4Matt

    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 12 September 2014 - 11:54 PM

Pratik, I agree that you may want to check your company's intranet. If your admin is as sharp as brent here than I suspect everything you need is there.





Also tagged with one or more of these keywords: P4Python, perforce

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users