Open bkornpob opened 4 years ago
Try this sequence of commands. Let's start with a new environment to make it clean:
conda create -n test-pyaxe-install -c http://ssb.stsci.edu/astroconda python=3 numpy astropy gsl stwcs wcstools cfitsio drizzlepac stsci.imagestats
conda activate test-pyaxe-install
give it a go and let me know what happens
git clone https://github.com/spacetelescope/pyaxe.git
cd pyaxe
python setup.py install
This gives me:
pyaxe 0.1.dev29+g386d88b pypi_0 pypi
I had no problem creating the environment. But, I cannot clone using the command line. It gave an error:
remote: Invalid username or password. fatal: Authentication failed for 'https://github.com/spacetelescope/pyaxe.git/'
Note: I used my github username and password.
So, I cloned by using the web interface, had pyaxe unzipped, and followed the installation. It gave an error:
(pyaxe) altalune:pyaxe kbhirombhakdi$ python setup.py install Traceback (most recent call last): File "setup.py", line 237, in
package_dir={'': '.'}, File "/Users/kbhirombhakdi/anaconda3/envs/pyaxe/lib/python3.7/site-packages/setuptools/init.py", line 145, in setup return distutils.core.setup(attrs) File "/Users/kbhirombhakdi/anaconda3/envs/pyaxe/lib/python3.7/distutils/core.py", line 108, in setup _setup_distribution = dist = klass(attrs) File "/Users/kbhirombhakdi/anaconda3/envs/pyaxe/lib/python3.7/site-packages/setuptools/dist.py", line 448, in init k: v for k, v in attrs.items() File "/Users/kbhirombhakdi/anaconda3/envs/pyaxe/lib/python3.7/distutils/dist.py", line 292, in init self.finalize_options() File "/Users/kbhirombhakdi/anaconda3/envs/pyaxe/lib/python3.7/site-packages/setuptools/dist.py", line 740, in finalize_options ep.load()(self) File "/Users/kbhirombhakdi/anaconda3/envs/pyaxe/lib/python3.7/site-packages/setuptools/dist.py", line 747, in _finalize_setup_keywords ep.load()(self, ep.name, value) File "/Users/kbhirombhakdi/anaconda3/envs/pyaxe/lib/python3.7/site-packages/setuptools_scm/integration.py", line 17, in version_keyword dist.metadata.version = get_version(value) File "/Users/kbhirombhakdi/anaconda3/envs/pyaxe/lib/python3.7/site-packages/setuptools_scm/init.py", line 150, in get_version parsed_version = _do_parse(config) File "/Users/kbhirombhakdi/anaconda3/envs/pyaxe/lib/python3.7/site-packages/setuptools_scm/init.py", line 113, in _do_parse "use git+https://github.com/user/proj.git#egg=proj" % config.absolute_root LookupError: setuptools-scm was unable to detect version for '/Users/kbhirombhakdi/_work/pyaxe'. Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.
For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
I followed this instruction (by Susana), and the installation went through:
- Make a new python 3 environment and a test directory:
mkdir pyaxetest cd pyaxetest conda create --name pyaxe python=3
- activate the new environemt
conda activate pyaxe
- install additional packages
conda install wcstools -c http://ssb.stsci.edu/astroconda conda install cfitsio gsl git clone https://github.com/sosey/pyaxe.git conda install drizzlepac
- change directory
cd pyaxe python setup.py install
make sure to be in this directory: /Users/deustua/pyaxetest/pyaxe
run the code: python pyaxe/tests/run_cookbook.py
that’s as far as I got – it’s now asking for the G141.lis file and the cookbook_data files. so that’s progress .
NOTE: I could download the repo directly from github using the command line, and the installation was successful. NOTE: I tried installing again by downloading the repo from the web interface. This gave the same error as previously posted.
Hi pyaXe Team,
I downloaded the repo, and created new conda environment (i.e., conda create --name pyaxe which gives Python 3.8.0 with no package when using conda list). From setup.cfg, individual packages (including setuptools_scm, setuptools, numpy, astropy, wcstools, cfitsio, gsl, stwcs, backports.tempfile, pytest, requests_mockl, pytest-catchlog, sphinx, and sphinx-automodapi) were installed. Then, from the pyaxe folder, using python setup.py install gives an error shown here. I found this discussion on github about the LookupError (https://github.com/pypa/setuptools_scm/issues/278), but I don't know if this would help.
Thank you, KB