NeurodataWithoutBorders / nwbwidgets

Explore the hierarchical structure of NWB 2.0 files and visualize data with Jupyter widgets.
https://nwb-widgets.readthedocs.io/en/latest/
Other
48 stars 21 forks source link

Running setup.py install for h5py ... error ERROR: Command errored out with exit status 1: #147

Closed Sagnik220 closed 3 years ago

Sagnik220 commented 3 years ago

I was trying to setup the repo locally, and while installing the packages this error occurred can someone help me resolve the issue.

Project Setup Issue 1

luiztauffer commented 3 years ago

hi @Sagnik220 , can you please provide some info:

Sagnik220 commented 3 years ago

I am using Windows 10, Yes I made a separate env using pip and using Python 3.9 There is similar issues when I am trying to install pynwb , should I use a different python version??

bendichter commented 3 years ago

Yes, can you please try with Python 3.8?

On Fri, Apr 2, 2021 at 10:33 PM Sagnik Mukherjee @.***> wrote:

I am using Windows 10, Yes I made a separate env using pip and using Python 3.9 There is similar issues when I am trying to install pynwb , should I use a different python version??

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NeurodataWithoutBorders/nwb-jupyter-widgets/issues/147#issuecomment-812780152, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGOEEUZ7LVFP47GMBNTO4LTGZ47TANCNFSM4Z6YQU3Q .

-- Benjamin Dichter, PhD Neuro-Data Engineer Founder, CatalystNeuro http://catalystneuro.com/ @.***

Sagnik220 commented 3 years ago

I am facing the problem when I am trying to install the nwbwidgets package, as it gets installed however when I try to import it does says no module.

During installation of nwbwidgets, h5py setup gives an error thus I am unable to import the package

luiztauffer commented 3 years ago

It looks like you’re trying to install in an existing environment. I recommend you try it on a clean environment:

conda create -n myenv python=3.8
conda activate myenv
pip install nwbwidgets

the installation should run successfully before you’re able to import and use it

Sagnik220 commented 3 years ago

Yes now the module are working fine, however when I try to run the jupyter notebook in Vscode the kernel died with exit error 1

It shows the following, any idea how to resolve this issue.

Kernel died with exit code 1. C:\Users\Sagnik\AppData\Roaming\Python\Python38\site-packages\traitlets\traitlets.py:2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use 'hmac-sha256' instead of '"hmac-sha256"' – or use CUnicode. warn( C:\Users\Sagnik\AppData\Roaming\Python\Python38\site-packages\traitlets\traitlets.py:2151: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'a6d5e697-725a-4d2a-85cb-a86467fb0186' instead of 'b"a6d5e697-725a-4d2a-85cb-a86467fb0186"'. warn( Traceback (most recent call last): File "C:\Users\Sagnik\anaconda3\envs\myenv\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\Sagnik\anaconda3\envs\myenv\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\Sagnik\AppData\Roaming\Python\Python38\site-packages\ipykernel_launcher.py", line 16, in app.launch_new_instance() File "C:\Users\Sagnik\AppData\Roaming\Python\Python38\site-packages\traitlets\config\application.py", line 844, in launch_instance app.initialize(argv) File "C:\Users\Sagnik\AppData\Roaming\Python\Python38\site-packages\traitlets\config\application.py", line 87, in inner return method(app, *args, **kwargs) File "C:\Users\Sagnik\AppData\Roaming\Python\Python38\site-packages\ipykernel\kernelapp.py", line 570, in initialize self.write_connection_file() File "C:\Users\Sagnik\AppData\Roaming\Python\Python38\site-packages\ipykernel\kernelapp.py", line 230, in write_connection_file write_connection_file(cf, ip=self.ip, key=self.session.key, transport=self.transport, File "C:\Users\Sagnik\AppData\Roaming\Python\Python38\site-packages\jupyter_client\connect.py", line 136, in write_connection_file with secure_write(fname) as f: File "C:\Users\Sagnik\anaconda3\envs\myenv\lib\contextlib.py", line 113, in enter return next(self.gen) File "C:\Users\Sagnik\AppData\Roaming\Python\Python38\site-packages\jupyter_core\paths.py", line 461, in secure_write win32_restrict_file_to_user(fname) File "C:\Users\Sagnik\AppData\Roaming\Python\Python38\site-packages\jupyter_core\paths.py", line 387, in win32_restrict_file_to_user import win32api ImportError: DLL load failed while importing win32api: The specified module could not be found.

Sagnik220 commented 3 years ago

Yes I have resolved the issue and setup the repo locally thanks for help! I have used python 3.9 and used a virtualenv with python-m venv env. image

ranningw commented 3 years ago

Hi,

how to solve the issue? could you tell me each step?

bendichter commented 3 years ago

@ranningw this error occurred during installation of h5py. I suggest running pip install h5py. If that does not work, you should consult their documentation. If it does work, you should then try pip install nwb-jupyter-widgets.

ranningw commented 3 years ago

@ranningw this error occurred during installation of h5py. I suggest running pip install h5py. If that does not work, you should consult their documentation. If it does work, you should then try pip install nwb-jupyter-widgets.

Thx for your help! I have solved the issue.