So I am currently stumbling on this problem https://github.com/NixOS/nixpkgs/issues/66366 and I was wondering if anyone could provide a workaround. In context on my work laptop (which is currently running NixOS unstable) I need to install a pip3 python package called stups
which also provides python executables.
Previously I used virtualenv
method mentioned here Python - NixOS Wiki, i.e.
let
my-python-packages = python-packages: with python-packages; [
virtualenvwrapper
# other python packages you want
];
python-with-my-packages = python37.withPackages my-python-packages;
in
Unfortunately this fails because of the previously linked issue. I also tried using GitHub - nix-community/pypi2nix: Abandoned! Generate Nix expressions for Python packages however running the generated package with nix-shell requirements.nix -A interpreter
results in
building '/nix/store/8g3f5q65g28wa1wpadpkdwcs3lv7mr3b-stups-1.1.21.tar.gz.drv'...
Download error on https://pypi.org/simple/flake8/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'flake8' (maybe misspelled?)
Download error on https://pypi.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or working download links found for flake8
Traceback (most recent call last):
File "nix_run_setup", line 8, in <module>
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
File "setup.py", line 156, in <module>
setup_package()
File "setup.py", line 151, in setup_package
entry_points={'console_scripts': CONSOLE_SCRIPTS},
File "/nix/store/dm5p0lmpj0k9p9xb1z62vzmcsmg12pd6-python3.7-setuptools-41.4.0/lib/python3.7/site-packages/setuptools/__init__.py", line 144, in setup
_install_setup_requires(attrs)
File "/nix/store/dm5p0lmpj0k9p9xb1z62vzmcsmg12pd6-python3.7-setuptools-41.4.0/lib/python3.7/site-packages/setuptools/__init__.py", line 139, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/nix/store/dm5p0lmpj0k9p9xb1z62vzmcsmg12pd6-python3.7-setuptools-41.4.0/lib/python3.7/site-packages/setuptools/dist.py", line 720, in fetch_build_eggs
replace_conflicting=True,
File "/nix/store/dm5p0lmpj0k9p9xb1z62vzmcsmg12pd6-python3.7-setuptools-41.4.0/lib/python3.7/site-packages/pkg_resources/__init__.py", line 782, in resolve
replace_conflicting=replace_conflicting
File "/nix/store/dm5p0lmpj0k9p9xb1z62vzmcsmg12pd6-python3.7-setuptools-41.4.0/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1065, in best_match
return self.obtain(req, installer)
File "/nix/store/dm5p0lmpj0k9p9xb1z62vzmcsmg12pd6-python3.7-setuptools-41.4.0/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1077, in obtain
return installer(requirement)
File "/nix/store/dm5p0lmpj0k9p9xb1z62vzmcsmg12pd6-python3.7-setuptools-41.4.0/lib/python3.7/site-packages/setuptools/dist.py", line 787, in fetch_build_egg
return cmd.easy_install(req)
File "/nix/store/dm5p0lmpj0k9p9xb1z62vzmcsmg12pd6-python3.7-setuptools-41.4.0/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 673, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('flake8')
unpacking sources
unpacking source archive /nix/store/0n2i9lazp89i9k7f85bxqg2shs1227vy-raven-6.10.0.tar.gz
source root is raven-6.10.0
builder for '/nix/store/3qmnjz6jfiiyhdn0d8arj5d53cyv8lld-python3.7-clickclick-1.2.2.drv' failed with exit code 1
Does anyone have any ideas where to go on from here? At this point I would just like to get something working, even if its hacky.