amuse icon indicating copy to clipboard operation
amuse copied to clipboard

amuse developer install error

Open psjadeja2024 opened this issue 3 years ago • 10 comments

i tried to install developer version of amuse by "pip install -e. " but phase some error. error mention below.

Defaulting to user installation because normal site-packages is not writeable Obtaining file:///home/prahlad/Downloads/amuse-main%282%29/amuse-main Installing build dependencies ... done Checking if build backend supports build_editable ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [38 lines of output] Traceback (most recent call last): File "/home/prahlad/.local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in main() File "/home/prahlad/.local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/home/prahlad/.local/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 164, in prepare_metadata_for_build_wheel return hook(metadata_directory, config_settings) File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 174, in prepare_metadata_for_build_wheel self.run_setup() File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 267, in run_setup super(_BuildMetaLegacyBackend, File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 158, in run_setup exec(compile(code, file, 'exec'), locals()) File "setup.py", line 76, in setup( File "/usr/lib/python3/dist-packages/setuptools/init.py", line 153, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 109, in setup _setup_distribution = dist = klass(attrs) File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 459, in init _Distribution.init( File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 293, in init self.finalize_options() File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 837, in finalize_options ep(self) File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 858, in _finalize_setup_keywords ep.load()(self, ep.name, value) File "/tmp/pip-build-env-fnv8cudu/overlay/local/lib/python3.10/dist-packages/setuptools_scm/integration.py", line 90, in version_keyword _assign_version(dist, config) File "/tmp/pip-build-env-fnv8cudu/overlay/local/lib/python3.10/dist-packages/setuptools_scm/integration.py", line 62, in _assign_version _version_missing(config) File "/tmp/pip-build-env-fnv8cudu/overlay/local/lib/python3.10/dist-packages/setuptools_scm/init.py", line 109, in _version_missing raise LookupError( LookupError: setuptools-scm was unable to detect version for /home/prahlad/Downloads/amuse-main(2)/amuse-main.

  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
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

psjadeja2024 avatar Jul 08 '22 10:07 psjadeja2024

Did you do a git clone? Can you try again with a target directory w/o parentheses in the name? for example:

cd /home/prhalad
mkdir projects
cd projects
git clone https://github.com/amusecode/amuse 
cd amuse
pip install -e .

ipelupessy avatar Jul 08 '22 14:07 ipelupessy

also, it is convenient to use a seperate python environment using virtual env or venv, so install python virtualenv and before pip installing:

cd projects
virtualenv amuse-env
source amuse-env/bin/activate
cd amuse
etc

ipelupessy avatar Jul 08 '22 14:07 ipelupessy

as you mention i tried this, at it's work. i also got message " mesa installation was successful " but after got this error.

Community codes not built (because of errors):

  • mesa_r2208 ================================================================================ 0 out of 1 codes built, 0 out of 0 libraries built Traceback (most recent call last): File "/home/prahlad/projects/amuse/setup.py", line 75, in setup( File "/home/prahlad/projects/Amuse-env/lib/python3.10/site-packages/setuptools/init.py", line 153, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.10/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.10/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/usr/lib/python3.10/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/home/prahlad/projects/amuse/support/setup_codes.py", line 1221, in run BuildCodes.run(self) File "/home/prahlad/projects/amuse/support/setup_codes.py", line 1100, in run raise Exception("No succesful builds detected. Aborting.") Exception: No succesful builds detected. Aborting. make: *** [Makefile:88: mesa_r2208.code] Error 1

psjadeja2024 avatar Jul 09 '22 06:07 psjadeja2024

Is there a file called build.log in the amuse root and can you post here?

ipelupessy avatar Jul 09 '22 07:07 ipelupessy

build.log

psjadeja2024 avatar Jul 09 '22 07:07 psjadeja2024

ok, thanks! this is in fact an issue with a change that was merged very recently.. (the data directories where moved, but I missed that the mesa makefile also has a reference to this location) ..need to fix it.. anyway do the other codes should work ok?

(you can (re)build a single code by e.g. make sse.code in the root)

ipelupessy avatar Jul 09 '22 08:07 ipelupessy

yes, other package are working smoothly. is there any another way to install mesa ?

psjadeja2024 avatar Jul 09 '22 08:07 psjadeja2024

I have pushed a fix, so it should work now

ipelupessy avatar Jul 09 '22 19:07 ipelupessy

ofcourse, you would rather use the new mesa mesa_r15140..

ipelupessy avatar Jul 10 '22 11:07 ipelupessy

now mesa_r2208 run perfectly, thank you so muchh.

i got also some error of ipykernel.

Usage: ipykernel_launcher.py [options] ipykernel_launcher.py: error: no such option: -f ERROR:root:Internal Python error in the inspect module. Below is the traceback from this internal error.

psjadeja2024 avatar Jul 11 '22 08:07 psjadeja2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 28 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 09 '22 09:09 stale[bot]

I am closing this issue, please open a new one if you are still having problems with the ipykernel..

ipelupessy avatar Sep 09 '22 09:09 ipelupessy