Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEURON no longer visible to pip in 8.2.4+ in Windows #2854

Open
thedannymarsh opened this issue Apr 24, 2024 · 3 comments
Open

NEURON no longer visible to pip in 8.2.4+ in Windows #2854

thedannymarsh opened this issue Apr 24, 2024 · 3 comments
Labels

Comments

@thedannymarsh
Copy link

Context

Overview of the issue

Previous version of NEURON had their windows installation visible to pip, allowing python modules to check for the presence of NEURON on install

(base) C:\Users\dpm42>pip show neuron
Name: NEURON
Version: 8.2.3
Summary: NEURON bindings for python
Home-page: UNKNOWN
Author: UNKNOWN
Author-email: UNKNOWN
License: UNKNOWN
Location: c:\nrn\lib\python
Requires:
Required-by:

Now the following occurs in 8.2.4:

(base) C:\Users\dpm42>pip show neuron
WARNING: Package(s) not found: neuron

NEURON setup

  • Version: 8.2.4
  • Installation method Windows exe installer
  • OS + Version: Windows 10
@pramodk
Copy link
Member

pramodk commented Apr 24, 2024

Thanks for the issue @thedannymarsh !

Tagging @nrnhines and @JCGoran. I think this could be anlso added as a test in our CI.

@nrnhines
Copy link
Member

First. I was completely unaware that there was a pip show neuron or that it ever worked :)
I see that the issue is also with the present version 9 neuron master.
One reason why I would expect it not to work (and the puzzle is why it ever did) is that on windows, NEURON is not installed with pip and the neuron module is not in python site-packages but in c:\nrn\lib\python and the module is found via the PYTHONPATH environment variable (defined when the setup.exe installs c:/nrn and sets various registry variables)

I'm going to speculate that the installer needs to do one more magic incantation so that pip is aware that the neuron module exists (via PYTHONPATH).

@JCGoran
Copy link
Contributor

JCGoran commented May 8, 2024

I think even if PYTHONPATH is modified, pip show neuron still wouldn't work because pip would not be able to find the metadata associated with the package, i.e. the [PACKAGE]-[VERSION].dist-info directory is missing (even though python -c 'import neuron;print(neuron.__file__)' will point to the correct __init__.py file), so the real fix would be to create the [PACKAGE]-[VERSION].dist-info directory (maybe via a special CMake target) and ship it with the installer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants