Installing P4Python on Mac OS 10.6.7 - python

I've found this link and it seems a bit out of date. So I'm hoping someone else has had this same problem.
I'm trying to install P4Python using these instructions.
After running the setup.py script, when I try to run p4test.py as the instructions request, I fail all but 4 tests.
I've downloaded the 10.2/bin.macosx105u p4api, I have gcc 4.2.1, and Python 2.6.1
I'm sure I've left out an important piece of information, so please just let me know what else is needed and I'll edit this post.
Edit: A note for any one else looking at this, I wasn't able to get the bin.macosx105u version of P4Api to compile correctly. Everything did work however when I used the bin.darwin90u version.

Do you have the p4d executable on your machine? See the Note in step 4 of the installation instructions. If p4d isn't there, it's quite possible that a lot of tests fail.
If you indeed don't have it (and don't want to or can't install it), then go ahead and continue with the installation and see if the P4API works.

Related

Problem Installing netfilterque in Python

I have a problem installing netfilterqueue for Python. I have this logs.
I am using Windows 10, not Linux, and Python 3.10
I've supplied both a short answer, and a longer explanation of it.
Short Answer
Unfortunately, the project seems to be abandoned after it only working with Python2. As a result, many people decided to downgrade to python2 to continue using it. However, forking a repo on GitHub fixed it for a while. However, the original person decided to stop updating it on GitHub.
Oremanj decided to take over maintainership of the project and keep it from going under. So, to install the fork that seems to work you would run this in terminal:
pip install cython
git clone https://github.com/oremanj/python-netfilterqueue
cd python-netfilterqueue
pip install .
Long Answer
There seems to be a lot of issues with getting it to work with python3 + scapy has the same issue with py3.
It seems like it works with python2. However, I am only referencing a thread that I found on the topic.
Referenced Here
However, I dug more into the topic and the issue and it seems like on the website it states that it works for python 3.6 and above.
It seems like it was abandoned: Referenced here:
I am mainly focusing on Cukic0d's answer to this question:
The project is abandoned but there are forks that fix this issue. https://github.com/kti/python-netfilterqueue/pull/60 especially upgrades netfilterqueue to build on modern Cython, allowing it to support Python > 3.6. You can try using that branch.
However, even looking at the GitHub it seemed like it was also abandoned. HOWEVER, it looks like oremanj on GitHub took over maintainership of the project: Referenced Here.
I've taken over maintainership of this project and just pushed an update. Will release to PyPI shortly; in the meantime you can pip install Git+https://github.com/oremanj/python-netfilterqueue.
I've never used netfilterqueue before. However, this is just some digging I did to hopefully get you a solution to this problem. If it still does not work let me know, and I'll dig further into what may be causing the issue.
Other solutions if it does not work I've referenced:
Microsoft Visual C++ 14.0 or greater is required, and you must install build visual tools 15, 17, 19 or greater. Download Here (This seems to not work for a lot of people, but it's worth a try) -- Referenced Here
Some people faced the same problem running the installation of it like this:
python -m pip install package-name
After many failed attempts, Lucas found that running it like this solved the issue:
py -m pip install package-name
He says that he gets two different python's one that is 3.9.8 and one that is 3.8.2: Referenced Here

How to install python developer package on Windows?

I ran into the same problem as here. So I tried to install python developer package but I didn't find the way to do this.
Cython's helloworld instruction doesn't contain any info about it, which seems strange and stupid to me to not include basic requirements into instruction, named "Basic Tutorial" (Sorry if I don't get something about it.)
Anyway... I'm using Windows 10, PyCharm, virtual environment with python 3. When I went to package install window, search result contained 5 packages:
So, which one?
I tried to install one, but it gives me an error:
I met this error in the past with some other package already. PyCharm's suggestion is to run that command from terminal. But from my experience that never helped. Usually solution was either to change name (because some names are right for Python 2.x, other for Python 3.x), or to download the package (egg/wheel) manually and install it offline.
This question was asked before already, but that one is for linux, which is not the case for me.
Can someone save some time for me and future generations, please? ;)
How do I install it and make Cython's helloworld example work?

Kivy installation python 2.7 windows 10

I want to develop python 2.7 app using Kivy library on Windows 10, but I do not know how to install it. I have tried to install Cython,Pygame and then Kivy.But it did not work. I have reinstalled all these things like Cython,Kivy,Python... And now I want to install it from the beginning. How can I install Kivy?
Your answers will be very appreciated.
Kivy changed a little bit since 1.8.0, use the new instructions if you have pdf docs, or some kind of book. So... the default provider is sdl2 now(pygame isn't necessary). Also, there's no need for compiling since there are wheels, so even cython and mingw aren't necessary(if you don't code with them). The only thing you need is python installed correctly.
At first of all you should visit main page and especially documentation where is described quite well what is needed and what you should install, yet still someone comes with missing dlls or something, therefore read it carefully. Or grab a tool.
But really, use the docs, most of the stuff is documented either in docs or here(examples, problems,...). No one's going to read it for you. :)

openSUSE: install alternate version of python without changing default version

I'm running openSUSE 13.2. I already had python 2.7.8 and python 3.4.x. I ran into a situation where a business server was running python 2.6. I wanted to make a virtualenv, but I need to install the specific version first. I couldn't find python 2.6 in yast and I wasn't getting any hits when I was search for stuff in zypper.
So I downloaded the tar ball from python's download page for python 2.6.6 and followed the directions in the readme
./configure
sudo make install
This worked, but it changed my default python interpreter in the process. I worked through that and now things are fine. But I might want to install a different python version in the future without having to worry about it changing my default interpreter. I'm pretty sure there's more I could do on my own, but I need to move on to something else and I'm wondering if anybody was some quick feedback on what I've done so far and what I should do in the future.
If you need to maintain distinct versions simultaneously, it's best to install each in its own tree. configure takes an optional --prefix=/path/to/installation/root argument.
At one site, we would install an add-on software package in something like /opt/local/x86_64-linux-gnu/python-2.6.6. Users who need this specific version can then add /opt/local/x86_64-linux-gnu/python-2.6.6/bin to their $PATH, or use virtualenv or GNU stow.

Error when installing pycrypto

I'm trying to install Fabric on my PC (with Windows + setuptools). It was giving me an error, since I have older version of pycrypto.
When I was trying to install latest version I stumble upon "Unable to find vcvarsall.bat" error. I googled something about MinGW, so I installed that too. I've added it to my Windows PATH, but now i'm getting another error, which looks like this: "command 'gcc' failed: no such file or directory." What do i do now? Found something about gcc-mingw, which is some version of MinGW that could help?
Why is has to be so damn complicated :D.
New development. Managed to install pycrytpo and fabric, but still can't run anything in the latter. New error says: "ImportError: no module named win32api". Quick google search says something about PyWin, but easy_install can't find it and it looks like it's abandoned. Any ideas?
Well, it's so complicated because C (C++? Can't remember what they used at the moment, but I am pretty sure they used C) is much, much better at math than Python, so the math pieces of PyCrypto are all written in C. It does have a _slowmath module if the compiled versions aren't available, but it's name is telling... it is much slower.
gcc is the GNU Compiler Collection (<!-- an edit, I had thought it stood for GNU C Compiler, but apparently my knowledge was dated). It is a bit legendary, but apparently your version of Windows has not heard of it. First question though, have you closed the "DOS prompt" and restart it? (it's in quotes because the people at superuser once yelled at me because I did not sufficiently acknowledge its inferiority) Environment Variables in Windows do not update during a "DOS session" (or whatever it is supposed to be called).
If you have, chances are that it can be found inside of the MingW install director -- if there is a bin folder I'd check there first. If not, I would search for gcc.exe and make sure that it's path is part of PATH. Then,
If all else fails, you might be able to get more info on MingW here.

Categories

Resources