Quantcast
Channel: Active questions tagged windows-subsystem-for-linux - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2827

Why I can't install some pip packages inside WSL2?

$
0
0

I installed WSL2 at my windows 10 machine. Inside my wsl2 I created a python3 virtual environment. I updated pip and tried to install some pip packages. But I got error while installing some packages like below. But the same package can be installed in my windows.

(venv) hello@user:/mnt/d/$ pip install -r requirements.txt    Collecting bs4==0.0.1      Using cached bs4-0.0.1.tar.gz (1.1 kB)        ERROR: Command errored out with exit status 1:         command: /mnt/d/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ajx1n6q_/bs4_7ffdc21734694a6887a23f302d08c219/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ajx1n6q_/bs4_7ffdc21734694a6887a23f302d08c219/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-3_f0uahc             cwd: /tmp/pip-install-ajx1n6q_/bs4_7ffdc21734694a6887a23f302d08c219/        Complete output (5 lines):        Traceback (most recent call last):          File "<string>", line 1, in <module>          File "/mnt/d/venv/lib/python3.8/site-packages/setuptools/__init__.py", line 15, in <module>            from setuptools.extern.six import PY3, string_types        ValueError: source code string cannot contain null bytes        ----------------------------------------    WARNING: Discarding https://files.pythonhosted.org/packages/10/ed/7e8b97591f6f456174139ec089c769f89a94a1a4025fe967691de971f314/bs4-0.0.1.tar.gz#sha256=36ecea1fd7cc5c0c6e4a1ff075df26d50da647b75376626cc186e2212886dd3a (from https://pypi.org/simple/bs4/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.    ERROR: Could not find a version that satisfies the requirement bs4==0.0.1    ERROR: No matching distribution found for bs4==0.0.1

When I install the same package from my window cmd then it installs bs4 without any error.


Viewing all articles
Browse latest Browse all 2827