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.
Related
Issue:
#python3 setup.py install
is failing
Environment: RHEL 8 UBI container
I have a setup.py that looks like this: (any pointers or updates on this setup.py would be appreciated)
import setuptools
print('python/setup.py')
setuptools.setup(
name="process_data",
version="1.0",
description="desc",
author="FirstName LastName",
author_email="dude#abides.abide",
url="https://some.com",
packages=setuptools.find_packages(),
)
I have a directory structure like so (<some>.py in every directory, along with __init__.py):
python/
setup.py
<dir>/__init__.py
<dir>/__init__.py
<dir4>/__init__.py
<dir4>/<sub-dir1>/__init__.py
<dir4>/<sub-dir1>/<sub-dir>__init__.py
I want code in each of these directories to be part of a module package so I can import, nested however deep.
I'm doing this:
#cd python
#python3 setup.py install
I get this error:
python/setup.py
running install
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
/usr/local/lib/python3.6/site-packages/test-easy-install-1625.write-test
[Errno 2] No such file or directory: '/usr/local/lib/python3.6/site-packages/test-easy-install-1625.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/usr/local/lib/python3.6/site-packages/
This directory does not currently exist. Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).
Questions:
Where is this coming from: test-easy-install-1625.write-test ? (so confused as to what this is)
On my system, indeed this directory does not exist (why is python3 setup.py install looking there? what told it to look there?):
/usr/local/lib/python3.6
There is nothing in my setup.py to indicate to look there.
I looked all over, and it looks like my /site-packages/ directory is here (where other modules are installed, when I ran pip)
`/usr/local/lib64/python3.6/site-packages/`
How do I fix this?
Thank you, I so badly need to get this working right away. I have been working on Windows, and >python setup.py install simply works there.
Are there any env variables I should have setup?
I simply installed python with: dnf -y install python36 that's it. (the latest version available in any RHEL 8 package repo for installation).
I ran into this same error and I was able to fix it by creating a symbolic link. I accept someone else maybe able to offer a more elegant solution and I welcome it.
sudo mkdir /usr/local/lib/python3.6
sudo ln -s /usr/lib/python3.6/site-packages /usr/local/lib/python3.6/
I assume you had enter python command mode, if you don't, the following commands are needed, notice to set variable Path and PythonPath of yours:
setlocal
set env_name=python3.6
set Path=C:\Users\s41167\Miniconda3\envs\%env_name%;C:\Users\s41167\Miniconda3\envs\%env_name%\Scripts;%Path%
set PythonPath=C:\Users\s41167\Miniconda3\envs\%env_name%\Lib\site-packages
cd C:\Users\s41167\Documents\%env_name%
cmd.exe /K activate %env_name%
if you enter python command mode, you can use pip to insall the package:
pip install <package location> --target <install location> --upgrade
below is my install command and result:
(python3.6) C:\Users\s41167\Documents\python3.6>pip install ./python_package --t
arget ./target --upgrade
Processing c:\users\s41167\documents\python3.6\python_package
Building wheels for collected packages: process-data
Building wheel for process-data (setup.py) ... done
Created wheel for process-data: filename=process_data-1.0-cp36-none-any.whl si
ze=1721 sha256=ef5eaf061000f30d472e5dde268694733e40a3f8a4a29fa78faec69f125443c9
Stored in directory: C:\Users\s41167\AppData\Local\Temp\pip-ephem-wheel-cache-
v6lt_ndp\wheels\61\01\f5\07e0760baa10d63e1c43b37eadbb55b79828f4fe337209026a
Successfully built process-data
Installing collected packages: process-data
Successfully installed process-data-1.0
(python3.6) C:\Users\s41167\Documents\python3.6>
and the file arrangement:
.\python_package
__init__.py
setup.py
\directory
__init__.py
\directory4
__init__.py
\sub_dirctory1
__init__.py
in Linux use
sudo python3 setup.py install
in windows use
python setup.py install
or
python3 setup.py install
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)
is it possible to do an editable pip install from a directory located on read-only filesystem? Right now setup tools is trying to write an egg file into the source directory:
$ pip install -e /tf/stuff/
Obtaining file:///tf/stuff
Complete output from command python setup.py egg_info:
running egg_info
writing requirements to src/stuff.egg-info/requires.txt
error: [Errno 30] Read-only file system: 'src/stuff.egg-info/requires.txt'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tf/stuff/
The docs say:
For local projects, the "SomeProject.egg-info" directory is created
relative to the project path. This is one advantage over just using
setup.py develop, which creates the "egg-info" directly relative the
current working directory.
If you have any writable filesystem in your environment you might be able to do what I did. I created a symbolic link in my source directory (src/stuff.egg-info in your example) that pointed to a location that is writable (perhaps on a different read-write filesystem) and was able to get pip install -e . to work.
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.
I tried to update the libxml2 & libxslt packages as mine are too old to run with lxml. I found a walkthrough here and tried to update the package with the command
sudo python setup.py install
but what I got was this error message:
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS
/Python: can't open file 'setup.py': [Errno 2] No such file or directory
So apparently there is no setup.py file in my Python folder (this is my current Python version, I already checked this!). How is this possible? Hope someone can help me!
To make this a formal answer from my comment...
setup.py is not part of the python installation location. It is included with the package that you wish to install. Change directories to the location of the source that you downloaded and then run the setup.py file.