space-physics / iri2016

International Reference Ionosphere 2016 from Python and Matlab
http://irimodel.org/
MIT License
67 stars 34 forks source link

Trouble Building IRI2016 #6

Closed w2naf closed 5 years ago

w2naf commented 5 years ago

Hi, Mike!

I'm trying to build this package but I'm having trouble:

w2naf@click:~/code/IRI2016$ sudo -H pip3 install -e .[tests]
[sudo] password for w2naf: 
Obtaining file:///home/w2naf/code/IRI2016
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Complete output from command /usr/bin/python3 /usr/local/lib/python3.5/dist-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp23tu6vqr:
  ERROR: Traceback (most recent call last):
    File "/usr/local/lib/python3.5/dist-packages/pip/_vendor/pep517/_in_process.py", line 207, in <module>
      main()
    File "/usr/local/lib/python3.5/dist-packages/pip/_vendor/pep517/_in_process.py", line 197, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/usr/local/lib/python3.5/dist-packages/pip/_vendor/pep517/_in_process.py", line 48, in get_requires_for_build_wheel
      backend = _build_backend()
    File "/usr/local/lib/python3.5/dist-packages/pip/_vendor/pep517/_in_process.py", line 39, in _build_backend
      obj = getattr(obj, path_part)
  AttributeError: module 'setuptools.build_meta' has no attribute '__legacy__'
  ----------------------------------------
ERROR: Command "/usr/bin/python3 /usr/local/lib/python3.5/dist-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp23tu6vqr" failed with error code 1 in /home/w2naf/code/IRI2016
w2naf@click:~/code/IRI2016$ 

Do you have any ideas on this?

I am running Ubuntu 16.04 with Python 3.5.2 I've updated all of my python packages.

Thanks, Nathaniel

brianbreitsch commented 5 years ago

I believe Python >= 3.6 is listed as a requirement in the README. The code uses new typing features in Python. Probably the best option is to upgrade your Python distribution. The package works well for me in Python 3.7.

1030ahmad1030 commented 5 years ago

I had the same problem and my python is 3.7. here is what i got

(base) PS C:\Users\ahmad> pip install -e .[tests] ERROR: File "setup.py" not found. Directory cannot be installed in editable mode: C:\Users\ahmad (base) PS C:\Users\ahmad>

scivision commented 5 years ago

This looks like an old setuptools version. Yes, currently Python >= 3.6 is required.

pip install --upgrade setuptools
scivision commented 5 years ago

@1030ahmad1030 this command should be

pip install -e iri2016
scivision commented 5 years ago

please reopen if still an issue.

1030ahmad1030 commented 5 years ago

I still have an error.........look what I had from my Anaconda prompt......

(base) C:\Users\ahmad>pip install --upgrade setuptools Requirement already up-to-date: setuptools in c:\users\ahmad\anaconda3\lib\site-packages (41.2.0)

(base) C:\Users\ahmad>pip install -e iri2016[tests] ERROR: iri2016[tests] is not a valid editable requirement. It should either be a path to a local project or a VCS URL (beginning with svn+, git+, hg+, or bzr+).

7

1030ahmad1030 commented 5 years ago

I also had these errors when I tried the other way.....

(base) C:\Users\ahmad>pip search iri2016 iri2016 (1.8.1) - IRI2016 International Reference Ionosphere from Python

(base) C:\Users\ahmad>pip install iri2016 Collecting iri2016 Using cached https://files.pythonhosted.org/packages/e7/95/47c29500ae63c021443a1f3343c223675d3091804925beaad209327e6202/iri2016-1.8.1.tar.gz ERROR: Command errored out with exit status 1: command: 'c:\users\ahmad\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\ahmad\AppData\Local\Temp\pip-install-3tuwua0v\iri2016\setup.py'"'"'; file='"'"'C:\Users\ahmad\AppData\Local\Temp\pip-install-3tuwua0v\iri2016\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info cwd: C:\Users\ahmad\AppData\Local\Temp\pip-install-3tuwua0v\iri2016\ Complete output (43 lines): running egg_info creating pip-egg-info\iri2016.egg-info writing pip-egg-info\iri2016.egg-info\PKG-INFO writing dependency_links to pip-egg-info\iri2016.egg-info\dependency_links.txt writing entry points to pip-egg-info\iri2016.egg-info\entry_points.txt writing requirements to pip-egg-info\iri2016.egg-info\requires.txt writing top-level names to pip-egg-info\iri2016.egg-info\top_level.txt writing manifest file 'pip-egg-info\iri2016.egg-info\SOURCES.txt' reading manifest file 'pip-egg-info\iri2016.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'pip-egg-info\iri2016.egg-info\SOURCES.txt' Traceback (most recent call last): File "C:\Users\ahmad\AppData\Local\Temp\pip-install-3tuwua0v\iri2016\setup.py", line 70, in meson_setup() File "C:\Users\ahmad\AppData\Local\Temp\pip-install-3tuwua0v\iri2016\setup.py", line 65, in meson_setup subprocess.check_call(['meson', str(SRCDIR)], cwd=BINDIR) File "c:\users\ahmad\anaconda3\lib\subprocess.py", line 342, in check_call retcode = call(*popenargs, *kwargs) File "c:\users\ahmad\anaconda3\lib\subprocess.py", line 323, in call with Popen(popenargs, **kwargs) as p: File "c:\users\ahmad\anaconda3\lib\subprocess.py", line 775, in init restore_signals, start_new_session) File "c:\users\ahmad\anaconda3\lib\subprocess.py", line 1178, in _execute_child startupinfo) FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\ahmad\AppData\Local\Temp\pip-install-3tuwua0v\iri2016\setup.py", line 72, in <module>
    cmake_setup()
  File "C:\Users\ahmad\AppData\Local\Temp\pip-install-3tuwua0v\iri2016\setup.py", line 56, in cmake_setup
    cwd=BINDIR)
  File "c:\users\ahmad\anaconda3\lib\subprocess.py", line 342, in check_call
    retcode = call(*popenargs, **kwargs)
  File "c:\users\ahmad\anaconda3\lib\subprocess.py", line 323, in call
    with Popen(*popenargs, **kwargs) as p:
  File "c:\users\ahmad\anaconda3\lib\subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "c:\users\ahmad\anaconda3\lib\subprocess.py", line 1178, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

scivision commented 5 years ago

It looks like the repo is not copied to your computer

git clone https://github.com/space-physics/iri2016

pip install -e iri2016
1030ahmad1030 commented 5 years ago

Thank you, am so happy.....It did install

1030ahmad1030 commented 5 years ago

please tell me how to run iri2016 in anaconda. I really need IRI2016 for my research

On Wed, Oct 2, 2019 at 11:15 AM Michael Hirsch, Ph.D. < notifications@github.com> wrote:

It looks like the repo is not copied to your computer

git clone https://github.com/space-physics/IRI2016 iri2016

pip install -e iri2016

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/space-physics/IRI2016/issues/6?email_source=notifications&email_token=AJCFMSAC5WOJEYIT2LMHSL3QMRKBHA5CNFSM4H3AIMEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAD6CIA#issuecomment-537387296, or mute the thread https://github.com/notifications/unsubscribe-auth/AJCFMSGZQY4JMOBYHZP4XEDQMRKBHANCNFSM4H3AIMEA .

scivision commented 5 years ago

I put example commands in the Readme along with the plots

1030ahmad1030 commented 5 years ago

I did everything I could.........I just could not Install the Gfortran maybe........but I got this error A full log can be found at C:\Users\MM\Downloads\sami2py-master\iri2016\build\meson-logs\meson-log.txt ================================================== warnings summary =================================================== Anaconda3\lib\site-packages\heapdict.py:11 C:\Users\MM\Anaconda3\lib\site-packages\heapdict.py:11: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working class heapdict(collections.MutableMapping):

-- Docs: https://docs.pytest.org/en/latest/warnings.html !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ======================================== 1 warnings, 2 error in 27.42 seconds =========================================

(base) C:\Users\MM>