I have installed pre setting(setuptools, pbr and other rpm), and then I am running following cmd to install:
**sudo python setup.py install
error in setup command: Error parsing /home/skumar/ceilometer/setup.cfg: OSError: [Errno 2] No such file or directory**
I can't get the problem.
My setup.cfg file is:
https://github.com/openstack/ceilometer/blob/stable/icehouse/setup.cfg
Ran into a similar problem trying to install a new python-neutronclient. I didn't know anything about pbr, but apparently it uses it. I found from here that git needed to be installed. Once I installed git and re-ran setup.py install, it gave me a different error:
error in setup command: Error parsing /tmp/python-neutronclient-contrail-icehouse/setup.cfg: Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. Are you sure that git is installed?
I removed the unzipped directory, checked it out via git, installed python-dev, and re-ran the setup.py install with success.
Related
I am trying to install TensorFlow (mac M1).
To do the installation, I first set up a virtual environment and then do the pip installation. However, while this works perfectly fine in my home directory, I can not do it at a different place, such as a folder in my Documents catalog.
The commands I am doing are the following:
/usr/bin/python3 -m venv env
source env/bin/activate
pip install tensorflow-macos
As I said, it works fine in the home catalog, but not in a specific folder.
The error I am getting when doing it in a specific folder:
Building h5py requires pkg-config unless the HDF5 path is explicitly specified
error: pkg-config probably not installed: FileNotFoundError(2, 'No such file or directory')
----------------------------------------
ERROR: Failed building wheel for h5py
I have checked that the python versions are the same, as well as pip. But still no success. I have also tried reinstalling NumPy, PEP515, p5py, and wheel. Also tried uninstalling TensorFlow in the home catalog before installing it somewhere else.
I'm new to python, and I was wondering if you could help me run a python script. I'm trying to run a script called PunchBox from Github: https://github.com/psav/punchbox. So far, I have Python 3.9.5 and Git Bash.
In the GitHub page, it says:
To install, clone the repo, cd into it and then execute the following:
virtualenv -p python2 .pb2
source .pb2/bin/activate
pip install -U pip
pip install .
What does this mean exactly? Where do I run this code?
So far, I tried downloading the zip file from GitHub, installing Python 3.5.9, using cmd, finding the directory with cd, and running that code; but got an error:
Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name punchbox was given, but was not able to be found.
error in punchbox setup command: Error parsing C:\Users\Mi\Downloads\punchbox-master\punchbox-master\setup.cfg: Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name punchbox was given, but was not able to be found.
There's also a requirements.txt that lists additional scripts needed:
pre-commit
click
mido
pbr
PyYAML
svgwrite
Do these install automatically upon running the script for the first time?
I'm a little confused why I'm getting an error. Do you know what I'm doing wrong?
Thank you so much!
Giovanni
I assume you are new to programming. You have to write these lines in a terminal.
On Windows, it is Command Prompt or PowerShell Applications (latter preferred). On macOS, it is terminal
Copy all these lines at once, and paste them to your preferred terminal. The terminal will automatically run these one after the another.
FYI: Venv is a python package to create a virtual environment. The preceding commands set up the environment. Now install the required dependencies using this command instead of the last command (pip install .)
pip install -r requirements.txt
Based on your comment, it looks like you don't have virtualenv installed in your system. You may install it using the command pip install virtualenv.
Now, as you are using a Windows machine, you may open a Command Prompt or Windows PowerShell window and navigate to the directory where your cloned project resides.
Now, execute the following commands.
virtualenv -p python2 .pb2
.pb2\Scripts\activate.bat
pip install -U pip
pip install -r requirements.txt
Once you are done working in your virtual environment (which is named .pb2), you may close it by executing deactivate command.
#Giovanni T.
See, as far as you have installed Python and also downloaded the GitHub Repository as a zip file.
pip install -r requirements.txt
Just run this command.
Please make sure that the directory is pointing to the folder where this requirements.txt file is stored.
I am trying to install the package gamry-parser (https://pypi.org/project/gamry-parser/).
However, the command window is unable to find the requirements.txt in the location it is looking for. I have tried to search the path it is searching in my computer, but it does not seem to exist(c:\users\name\appdata\local\temp\pip-install-rfy1sh\gamry-parser\setup.py). In addition, the requirements.txt does in fact exist, but not in this nonexistant path. I get the following error:
IOError: [Errno 2] No such file or directory: 'requirements.txt'
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Thanks.
gamry-parser 0.4.1 provides a wheel for Python 3 and a source dist that will be used for Python 2.7. I tested them — the wheel installed with Python 3.7, no problem.
The problem is with Python 2.7 and the source distribution — the sdist lacks requirements.txt. To fix it they need to add file MANIFEST.in:
echo include requirements.txt > MANIFEST.in
git add MANIFEST.in
git commit -m "Add MANIFEST.in for sdist"
Please report the issue or send a pull request.
I tried installing Jupyter through pip and it failed showing this.
The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been
aborted.
This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand. Please, inform the package's author and the
EasyInstall maintainers to find out if a fix or workaround is
available.
Try to upgrade your packages:
pip install --upgrade setuptools
pip install --upgrade pip
its seems like missmatch in your versions
simply follow this to install jupyter in windows :-
1nd - Go to file manager and find python folder (like:-python,python37,python39 etc...) may be it's in (C:\Python39) or (C:\Users\prade\AppData\Local\Programs\python39) .
2rd - in python folder open Scripts folder (Ex:- C:\......\python39\Scripts) and copy this path.
3rd - run cmd as administrator and past above path using cd (like:- cd C:\.....\python39\Scripts)
4th - now simply use jupyter install command (like:- pip install jupyterlab)
I have been trying to install Python 2.7 XGBoost on my mac. I am running a framework build of python via brew and trying to install into a virtualenv. I have tried the following methods:
Manual build found here: https://github.com/dmlc/xgboost/blob/master/doc/build.md#python-package-installation
This results in this error:
error: Error: setup script specifies an absolute path:
/Users/username/git/xgboost/python-package/xgboost/../../lib/libxgboost.so
setup() arguments must *always* be /-separated paths relative to the
setup.py directory, *never* absolute paths.
I was able to build xgboost, but I cant install the package. The docs discuss needing disutils, but I can't find it anywhere. I tried running on disutils2, but that didn't work.
pip install found here: https://pypi.python.org/pypi/xgboost/
This results in this error:
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/jj/7r79983d7jvcz_1y6w2n5v2m0000gn/T/pip-build-l4ak5P/xgboost/
Removing "include_package_data=True" from setup.py helps.
See: https://github.com/django-salesforce/django-salesforce/issues/19
In python-package folder,
modify include_package_data=False in setup.py, and python setup.py install;
run: sudo cp ./xgboost/VERSION you_python_lib_location/site-packages/you_xgboost_version.egg/xgboost/
In my computer, you_python_lib_location is /Users/LeonTao/anaconda2/lib/python2.7 and you_xgboost_version.egg is xgboost-0.6-py2.7.egg. So I run:
sudo cp ./xgboost/VERSION /Users/LeonTao/anaconda2/lib/python2.7/site-packages/xgboost-0.6-py2.7.egg/xgboost/