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

BUG: build from source does not work anymore ("No section: 'versioneer') #50084

Closed
3 tasks done
toobaz opened this issue Dec 6, 2022 · 5 comments
Closed
3 tasks done
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member

Comments

@toobaz
Copy link
Member

toobaz commented Dec 6, 2022

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

git clone https://github.com/pandas-dev/pandas.git
cd pandas
python3 setup.py build_ext --inplace

Issue Description

The above raises

Traceback (most recent call last):
  File "/tmp/pandas/setup.py", line 666, in <module>
    version=versioneer.get_version(),
  File "<string>", line 1800, in get_version
  File "<string>", line 1732, in get_versions
  File "<string>", line 396, in get_config_from_root
  File "/usr/lib/python3.9/configparser.py", line 781, in get
    d = self._unify_values(section, vars)
  File "/usr/lib/python3.9/configparser.py", line 1149, in _unify_values
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'versioneer'

Expected Behavior

This command has always worked, at least until April.

I have tried to understand what to do from https://github.com/python-versioneer/python-versioneer , and it says that the section is required in setup.cfg or pyproject.toml (and we have the latter). So not sure why it fails. In any case, copypasting the section also to setup.cfg and running versioneer install --no-vendor gives:

/home/nobackup/repo/pandas
 creating "pandas/_version.py"
Traceback (most recent call last):
  File "/home/pietro/.local/bin/versioneer", line 8, in <module>
    sys.exit(main())
  File "/home/pietro/.local/lib/python3.9/site-packages/versioneer.py", line 1932, in main
    setup_command()
  File "<string>", line 2197, in setup_command
  File "<string>", line 2118, in do_setup
FileNotFoundError: [Errno 2] No such file or directory: '"pandas/_version.py"'

... which is to me even more weird - pandas/_version.py is definitely there.

I guess this might be related to #49924 , but I hadn't compiled pandas since months, so I'm not sure.

Installed Versions

Notice that the commit is wrong. I'm on 7d2337a , which however I can't compile. Also notice that versioneer is 0.28. Also notice that the bug is not tested with the last version of pandas - it's in git only. However if I don't check the box at the top it won't let me submit the issue.

INSTALLED VERSIONS

commit : 4bfe3d0
python : 3.9.2.final.0
python-bits : 64
OS : Linux
OS-release : 5.18.0-0.deb11.4-amd64
Version : #1 SMP PREEMPT_DYNAMIC Debian 5.18.16-1~bpo11+1 (2022-08-12)
machine : x86_64
processor :
byteorder : little
LC_ALL : None
LANG : it_IT.UTF-8
LOCALE : it_IT.UTF-8

pandas : 1.4.2
numpy : 1.23.3
pytz : 2021.1
dateutil : 2.8.2
pip : 20.3.4
setuptools : 52.0.0
Cython : 0.29.32
pytest : 6.0.2
hypothesis : 5.43.3
sphinx : 3.4.3
blosc : 1.9.2
feather : None
xlsxwriter : 1.1.2
lxml.etree : 4.6.3
html5lib : 1.1
pymysql : None
psycopg2 : 2.8.6
jinja2 : 2.11.3
IPython : 7.20.0
pandas_datareader: None
bs4 : 4.8.2
bottleneck : 1.3.4
brotli : 1.0.9
fastparquet : None
fsspec : 0.8.4
gcsfs : None
markupsafe : 1.1.1
matplotlib : 3.3.4
numba : None
numexpr : 2.7.2
odfpy : None
openpyxl : 3.0.3
pandas_gbq : None
pyarrow : None
pyreadstat : 1.1.0
pyxlsb : None
s3fs : None
scipy : 1.6.0
snappy : None
sqlalchemy : 1.3.22
tables : 3.6.1
tabulate : None
xarray : 0.16.1
xlrd : 2.0.1
xlwt : 1.3.0
zstandard : None

@toobaz toobaz added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Dec 6, 2022
@MarcoGorelli
Copy link
Member

MarcoGorelli commented Dec 6, 2022

versioneer has been added to environment.yml and requirements-dev.txt, you'll need to re-build your environment

@toobaz
Copy link
Member Author

toobaz commented Dec 6, 2022

versioneer has been added to environment.yml and requirements-dev.txt, you'll need to re-build your environment

I do have versioneer installed. What environment do you refer to? I'm just doing the above in a shell, with all required dependencies installed.

@MarcoGorelli
Copy link
Member

MarcoGorelli commented Dec 6, 2022

your development environment

can you try to install versioneer[toml]?

either that, or try clearing non-tracked files git clean -fxfd pandas

building from source definitely works, we did a couple of sprints last week

@toobaz
Copy link
Member Author

toobaz commented Dec 6, 2022

can you try to install versioneer[toml]?

Aha, that was it. Sorry for the noise, I had no idea it was a different package altogether.

@toobaz toobaz closed this as completed Dec 6, 2022
@ChristopherDavisUCI
Copy link

This thread was helpful to me, thank you! In my Mac terminal, I had to put quotation marks around versioneer[toml], so I had to type pip install 'versioneer[toml]'. Just wanted to post that in case anyone else is stuck in the same place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member
Projects
None yet
Development

No branches or pull requests

3 participants