seung-lab / fpzip

Cython bindings for fpzip, a floating point image compression algorithm.
BSD 3-Clause "New" or "Revised" License
34 stars 5 forks source link

fpzip installation fails with error code 1 #10

Closed moenigin closed 5 years ago

moenigin commented 5 years ago

Hi Will,

I was trying to install fpzip in order to install cloud-volume. I am using a conda environment with python3.7, numpy is already installed. I was first trying to install fpzip using pip and then tried to install the setup.py directly downloaded from git. Here is the error code I get:

C:\Users\moennila\AppData\Local\Temp\Temp1_fpzip-master.zip\fpzip-master>python setup.py install ERROR:root:Error parsing Traceback (most recent call last): File "c:\users\moennila\appdata\local\temp\temp1_fpzip-master.zip\fpzip-master.eggs\pbr-5.1.1-py3.7.egg\pbr\core.py", line 96, in pbr attrs = util.cfg_to_args(path, dist.script_args) File "c:\users\moennila\appdata\local\temp\temp1_fpzip-master.zip\fpzip-master.eggs\pbr-5.1.1-py3.7.egg\pbr\util.py", line 256, in cfg_to_args pbr.hooks.setup_hook(config) File "c:\users\moennila\appdata\local\temp\temp1_fpzip-master.zip\fpzip-master.eggs\pbr-5.1.1-py3.7.egg\pbr\hooks__init__.py", line 25, in setup_hook metadata_config.run() File "c:\users\moennila\appdata\local\temp\temp1_fpzip-master.zip\fpzip-master.eggs\pbr-5.1.1-py3.7.egg\pbr\hooks\base.py", line 27, in run self.hook() File "c:\users\moennila\appdata\local\temp\temp1_fpzip-master.zip\fpzip-master.eggs\pbr-5.1.1-py3.7.egg\pbr\hooks\metadata.py", line 26, in hook self.config['name'], self.config.get('version', None)) File "c:\users\moennila\appdata\local\temp\temp1_fpzip-master.zip\fpzip-master.eggs\pbr-5.1.1-py3.7.egg\pbr\packaging.py", line 848, in get_version name=package_name)) Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name fpzip was given, but was not able to be found. error in setup command: Error parsing C:\Users\moennila\AppData\Local\Temp\Temp1_fpzip-master.zip\fpzip-master\setup.cfg: Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name fpzip was given, but was not able to be found.

Can you help me out with that? Is fpzip not yet supported for python3.7? Thanks a lot!

william-silversmith commented 5 years ago

Hi @moenigin,

This is a pretty good test case for me because your setup has tweaked nearly every parameter that goes into our continuous integration system. Typically we deploy cloud-volume on Ubuntu, Python 2.7, 3.4, 3.5, and 3.6 with some testing on OS X, and we typically use virtualenv instead of anaconda (though some people in our lab use conda). I think we got CloudVolume working on Python 3.7, but it's not regularly tested as TravisCI doesn't support it out of the box just yet.

My labmate has an AMD 64 Windows machine running anaconda and python 3.5. We manage to install fpzip 1.1.2 on it using the Visual Studio compiler (if you don't have a C++ compiler maybe that's one cause of the issue?). We built a binary and uploaded it to PyPI https://pypi.org/project/fpzip/1.1.2/#files.

Did you get the same error installing with pip? If you're running AMD64, you can try switching to python3.5 and seeing if the binary we compiled works for you. You can also try running python setup.py develop and seeing if the error still persists.

For what it's worth, I suspect that CloudVolume will not install correctly on Windows because of our use of the posix_ipc package. It might be possible for me to change CloudVolume to skip installing it on windows machines. The downside would be that you would not have access to multi-core downloads that serialize to a single numpy array.

Let me know if any of this helps!

Will

william-silversmith commented 5 years ago

Actually, I take back what I said about Windows not being able to use the parallel flag. I wrote shared memory emulation for OS X using files. Windows could use that too provided cloud-volume installs without crashing.

william-silversmith commented 5 years ago

@moenigin We were able to reproduce your issue. Make sure you do git clone https://github.com/seung-lab/fpzip.git instead of installing from the zip file or try pip install fpzip again. Maybe the binaries will help (I just uploaded a 3.7 windows AMD 64 version).

moenigin commented 5 years ago

Hi Will,

Thanks a lot for this amazing feedback and support. I could install fpzip with the binaries you provided!

Unfortunately, cloud-volume installation failed again as you predicted at the posix_ipc installation. Apparently VS2017 does not include a sys/time.h. For now, I think I'll try to set up everything in a VM with Ubuntu, since Windows just seems to be in my here.

Thanks again! Nila

william-silversmith commented 5 years ago

I'm glad that worked for you! Yea, CloudVolume is definitely more tested on Ubuntu (honestly we'd never even tried Windows before). If you have any more issues related to CloudVolume directly, please open one on https://github.com/seung-lab/cloud-volume/issues.

Will