Pylibnet installation error ubuntu 14 - python

I've been looking in the internet for a solution of this issue when i try to install pylibnet , i would like to know if you guys were be able to install pylibnet succesfully and how.
Thanks
root#root:/home/core2# pip install ./pylibnet-3.0-beta-rc1.tar.gz
Unpacking ./pylibnet-3.0-beta-rc1.tar.gz
Running setup.py (path:/tmp/pip-LSMFJM-build/setup.py) egg_info for package from file:///home/core/pylibnet-3.0-beta-rc1.tar.gz
Searching for libnet...
Could not locate the static library "libnet.a"
Complete output from command python setup.py egg_info:
Searching for libnet...
Could not locate the static library "libnet.a"
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 255 in /tmp/pip-LSMFJM-build
Storing debug log for failure in /root/.pip/pip.log

Try runnning
$ find / | grep libnet.a
or
$ locate libnet.a
and if it is found somewhere then move it to /usr/lib/libnet.a because this is where pip looks for it when it trys to install pylibnet e.g.
$ sudo cp /usr/lib/i386-linux-gnu/libnet.a /usr/lib/libnet.a
this worked for me :-)

Related

Python - Installation build wheel error when installing from local directory

I want to install a package from GitHub that uses Cython (https://github.com/mlysy/kalmantv). I cloned the package locally, and after trying to install it with pip install ., I'm getting the following error:
DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
Processing /Users/me/Downloads/kalmantv
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /Users/me/.pyenv/versions/3.8.3/bin/python3.8 /Users/me/.pyenv/versions/3.8.3/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /var/folders/g1/0pjsd_bs24jgccrd6g0lzfvc0000gn/T/tmpxmrdlgnk
cwd: /Users/me/Downloads/kalmantv
Complete output (6 lines):
running egg_info
writing kalmantv.egg-info/PKG-INFO
writing dependency_links to kalmantv.egg-info/dependency_links.txt
writing requirements to kalmantv.egg-info/requires.txt
writing top-level names to kalmantv.egg-info/top_level.txt
error: package directory 'eigen-3.3.7' does not exist
----------------------------------------
WARNING: Discarding file:///Users/me/Downloads/kalmantv. Command errored out with exit status 1: /Users/me/.pyenv/versions/3.8.3/bin/python3.8 /Users/me/.pyenv/versions/3.8.3/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /var/folders/g1/0pjsd_bs24jgccrd6g0lzfvc0000gn/T/tmpxmrdlgnk Check the logs for full command output.
ERROR: Command errored out with exit status 1: /Users/me/.pyenv/versions/3.8.3/bin/python3.8 /Users/me/.pyenv/versions/3.8.3/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /var/folders/g1/0pjsd_bs24jgccrd6g0lzfvc0000gn/T/tmpxmrdlgnk Check the logs for full command output.
I tried adding --use-feature=in-tree-build from the deprecation warning but still got the error (without the initial warning).
I saw a number of suggestions such as using pip install --upgrade pip setuptools wheel, but nothing is doing the trick. I would guess that this has a simple fix but this stuff is a little over my head and I don't want to break anything else.
What do I need to do to safely correct this issue without causing other problems?
The setup.py file has the following lines:
# path to eigen library
EIGEN_PATH = r"eigen-3.3.7"
Strangely, it seems to expect the Eigen header library to be present at that location. You can install the library with brew install eigen, or sudo apt install libeigen3-dev. Note that this may not install version 3.3.7 of the library, which the project expects. I don't know if using a newer version would cause any issues.
If you want to install version 3.3.7, you can build and install it from source with the following link by following these instructions:
https://gitlab.com/libeigen/eigen/-/releases/3.3.7
Once that's done, change to the project directory, and create a symlink to the Eigen library:
If installed with brew: ln -s /usr/local/Cellar/eigen/*/include/eigen3 eigen-3.3.7
If installed with apt: ln -s /usr/include/eigen3 eigen-3.3.7
If installed from source: /usr/local/include/eigen3 eigen-3.3.7
Once the Eigen library has been installed and made available at ./eigen-3.3.7, pip install . should work, but for good measures you should run the following command first:
pip install -U pip setuptools wheel; pip install -U cython
Refer to Catalina C++: Using <cmath> headers yield error: no member named 'signbit' in the global namespace if you run into an error like: error: no member named 'signbit' in the global namespace.

`pip3 install psutil` Error - Repository Not Found

I am running the command pip3 install psutil, but running into the following error:
me$ pip3 install psutil
Collecting psutil
Using cached https://files.pythonhosted.org/packages/51/9e/0f8f5423ce28c9109807024f7bdde776ed0b1161de20b408875de7e030c3/psutil-5.4.6.tar.gz
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/psutil.egg-info
writing pip-egg-info/psutil.egg-info/PKG-INFO
writing dependency_links to pip-egg-info/psutil.egg-info/dependency_links.txt
writing top-level names to pip-egg-info/psutil.egg-info/top_level.txt
writing manifest file 'pip-egg-info/psutil.egg-info/SOURCES.txt'
error: [Errno 2] No such file or directory: '': ''
abort: no repository found in '/private/var/folders/n2/2rxj0k0d3bb73gbfstgcgzs40000gp/T/pip-install-y27z_s2w/psutil' (.hg not found)!
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/n2/2rxj0k0d3bb73gbfstgcgzs40000gp/T/pip-install-y27z_s2w/psutil/
I've tried everything and cannot find a solution - it works fine using pip install psutil.
This isn't the only package that this error is occurring on.
Any help would be appreciated!
Thanks!
Uninstalled both 2.7 and 3, and uninstalled mercurial then brew install-ed both python#2 and python#3.

M2Crypto installation fails on Amazon Beanstalk

I am trying to install python package "M2Crypto" via requirements.txt and I receive the following error message:
/usr/include/openssl/opensslconf.h:36: Error: CPP #error ""This openssl-devel package does not work your architecture?"". Use the -cpperraswarn option to continue swig processing.
error: command 'swig' failed with exit status 1
I tried passing
option_name: SWIG_FEATURES
value: "-cpperraswarn -includeall -I/usr/include/openssl"
But the error persists. Any idea?
The following config file (placed in .ebextensions) works for me:
packages:
yum:
swig: []
container_commands:
01_m2crypto:
command: 'SWIG_FEATURES="-cpperraswarn -includeall -D`uname -m` -I/usr/include/openssl" pip install M2Crypto==0.21.1'
Make sure you don't specify M2Crypto in your requirements.txt though, Elastic Beanstalk will try to install all dependencies before running the container commands.
I have found a solution that gets M2Crypto installed on Beanstalk but it is a bit of hack and it is your responsibility to make sure that it is good for a production environment. I dropped M2Crypto from my project because this issue is ridiculous, try pycrypto if you can.
Based on (I only added python setup.py test):
#!/bin/bash
python -c "import M2Crypto" 2> /dev/null
if [ "$?" == 1 ]
then
cd /tmp/
pip install -d . --use-mirrors M2Crypto==0.21.1
tar xvfz M2Crypto-0.21.1.tar.gz
cd M2Crypto-0.21.1
./fedora_setup.sh build
./fedora_setup.sh install
python setup.py test
fi`
In the environment config file
commands:
m2crypto:
command: scripts/m2crypto.sh
ignoreErrors: True
test: echo '! python -c "import M2Crypto"' | bash
ignoreErrors is NOT a good idea but I just used it to test if the package actually gets installed and seems like it.
Again, this might seem to get the package installed but I am not sure because removing ignoreErrors causes failure. Therefore, I won't mark this as the accepted answer but it was way too much to be a comment.

Command python setup.py egg_info failed with error code 1 Mac OS

i know there is some poste like that but i try so mutch solutions and they don't work...
So i wanna build https://github.com/daid/Cura on MAC OS X, but it's don't works, my problem is:
When i try to did that on my virtualenv:
$ pip install -r requirements_darwin.txt
At the end he give me an error :
$ Command python setup.py egg_info failed with error code 1 in /Users/...
Any ideas ?

Python Selenium noarch RPM build failure

Attempting to build Python Selenium noarch rpm from downloaded selenium-2.20.0.tar.gz
All necessary Python requirements are installed and working, using command:
python setup.py bdist --format=rpm
RPMBuild fails with error message:
Arch dependent binaries in noarch package
error: command 'rpmbuild' failed with exit status 1
Have tried following the suggestion of adding an additiional %define to the selenium.SPEC file, found under build/bdist.linux-i686/rpm/SPECS/selenium.spec
%define _binaries_in_noarch_packages_terminate_build 0
Unfortunately when i re-run the RPM build, the change is not picked up and the contents of the SPEC file after the build seem to have re-verted as the newly added %define is no longer present?!
Any suggestions welcome please..
Changes to selenium.spec weren't persisting as the spec file is automatically generated from content mostly from within setup.py
Two solutions were found:
1) Download most recent version of selenium-2.20.0.tar.gz from http://pypi.python.org/pypi/selenium/ to target machine, tar extract and run:
python setup.py install
2) Install python pip, then use pip to dowload and install the latest selenium in an automated fashion with the command:
pip install -U selenium
As yet i have not found the exact content that can be added to setup.py that will add the necessary RPM build define to the selenium.spec file for creating an installation RPM..
For the future if anyone comes across this
python setup.py bdist_rpm --force-arch x86_64
Worked for me

Categories