Open ranrubin opened 2 years ago
Hi @ranrubin, thank you very much for pointing this out.
Just a quick question, is there any chance the version
variable in your setup.py
maybe be having a None
value?
(I had a very quick look at your repo, maybe the VERSION
file is missing in the MANIFEST.in
?)
Hi @abravalheri :)
I'm not a contributer to that repository, so I'm not that familiar with the code. It seesm like setup.py
uses VERSION
file in order to get the version.
When I tried to install the package and got the mentioned error, manually editing site-packages/pkg_resources/_vendor/packaging/version.py
with str()
solved it, and the package itself got the proper version value (pytorch-quantization==2.1.2
)
Ah, I see. sorry for the confusion!
I'm not a contributer to that repository, so I'm not that familiar with the code. It seems like
setup.py
usesVERSION
file in order to get the version.
Yeah that is the part that I found very curious. In theory the default behaviour of open
should be to open files in the text more/read-only (r
), so version
should already be a string... I have to investigate this issue more deeply.
This problem is crazy difficult to track down. I tried to follow the instructions for building the package, but it is very difficult and I suspect it depends on the hardware you have available in your machine. The C code simply does not compile in my machine (probably because it requires you to have the correct hardware and drivers).
If I comment out the ext_modules=[...]
part o setup.py
things build correctly and the version seems to be recognized fine...
@ranrubin can you try this again with the latest version of setuptools + making sure to use a conda environment instead of relying on the global Python provided by conda?
here is the anaconda3\envs\textgen\lib\site-packages\torch\version.py file in my system causing the issue,
debug = False
cuda = None
git_version = '49444c3e546bf240bed24a101e747422d1f8a0ee'
hip = None
I think pytorch-nightly besides possibility to use cuda 12.1 it not have specified version (i.e. auto-generated like 'pytorch-nightlycommit
not in this much, but trying to upgrade oobabooga/one-click-installers to use cuda 12.1 not 11.7
setuptools version
62.6.0
Python version
3.9.12
OS
Ubuntu 18
Additional environment information
No response
Description
While trying to install a package from source (pytorch-quantization), using
python setup.py install
, on aconda
environment, I got the following error:Expected behavior
Not crashing with an error :)
How to Reproduce
Follow this README file to build from source
Output