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] - FileNotFoundError: [Errno 2] No such file or directory:python3.9/site-packages/playwright/driver/playwright-cli' #4800

Closed
mikegrep opened this issue Dec 22, 2020 · 9 comments

Comments

@mikegrep
Copy link

mikegrep commented Dec 22, 2020

trying to install python -m playwright install on Ubuntu 18.04 Python3.9 i368 got this error message
FileNotFoundError: [Errno 2] No such file or directory: '/home/pc/tiktokbot/TikTok-Api/venv/lib/python3.9/site-
packages/playwright/driver/playwright-cli'
same and without virtualenv
npm insatll:
npm ERR! Linux 4.15.0-128-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "i" "-D" "playwright"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE

npm ERR! playwright@1.7.0 install: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the playwright@1.7.0 install script 'node install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the playwright package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs playwright
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls playwright
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/pc/tiktokbot/TikTok-Api/npm-debug.log

@dgozman
Copy link
Contributor

dgozman commented Dec 23, 2020

Unfortunately, we are not able to reproduce this issue. Could you please share detailed log of all commands you run and their output? Something like this:

$ pip install playwright
Collecting playwright
  Downloading playwright-0.171.0-py3-none-manylinux1_x86_64.whl (65.6 MB)
     |████████████████████████████████| 65.6 MB 818 kB/s 
Collecting typing-extensions
  Using cached typing_extensions-3.7.4.3-py3-none-any.whl (22 kB)
Collecting greenlet==1.0a1
  Using cached greenlet-1.0a1-cp38-cp38-manylinux2010_x86_64.whl (165 kB)
Collecting pyee>=8.0.1
  Using cached pyee-8.1.0-py2.py3-none-any.whl (12 kB)
Installing collected packages: typing-extensions, greenlet, pyee, playwright
Successfully installed greenlet-1.0a1 playwright-0.171.0 pyee-8.1.0 typing-extensions-3.7.4.3

$ python -m playwright install

@yury-s
Copy link
Member

yury-s commented Dec 23, 2020

Just tried to run it in ubuntu:bionic Docker image like this and it didn't throw any issues, so there must be something special about your configuration:

docker run -it --rm --ipc=host ubuntu:bionic
#Then inside docker:
cd
apt-get update
apt-get install python3.8 python3.8-dev python3.8-distutils python3.8-venv
python3.8 -m venv dev3.8/
source dev3.8/bin/activate
pip install playwright
python -m playwright install

It may also be because of python3.9, how did you install it?

@mikegrep
Copy link
Author

mikegrep commented Dec 23, 2020

in docker everyting was ok till:

unable to execute 'i686-linux-gnu-gcc': No such file or directory
error: command 'i686-linux-gnu-gcc' failed with exit status 1

Command "/root/dev3.8/bin/python3.8 -u -c "import setuptools, tokenize;file='/tmp/pip-build-b2fxm52c/greenlet/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-wawd5ytc-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/dev3.8/include/site/python3.8/greenlet" failed with error code 1 in /tmp/pip-build-b2fxm52c/greenlet/

traceback in virtual env out of doker:

(venv) pc@pc-pc:/tiktokbot/TikTok-Api$ pip install playwright
Requirement already satisfied: playwright in ./venv/lib/python3.9/site-packages (0.162.2)
Requirement already satisfied: typing-extensions in ./venv/lib/python3.9/site-packages (from playwright) (3.7.4.3)
Requirement already satisfied: greenlet==1.0a1 in ./venv/lib/python3.9/site-packages (from playwright) (1.0a1)
Requirement already satisfied: pyee>=8.0.1 in ./venv/lib/python3.9/site-packages (from playwright) (8.1.0)
WARNING: You are using pip version 20.3.1; however, version 20.3.3 is available.
You should consider upgrading via the '/home/pc/tiktokbot/TikTok-Api/venv/bin/python -m pip install --upgrade pip' command.
(venv) pc@pc-pc:
/$ python -m playwright install
Traceback (most recent call last):
File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/pc//venv/lib/python3.9/site-packages/playwright/main.py", line 17, in
main()
File "/home/pc/i/venv/lib/python3.9/site-packages/playwright/main.py", line 135, in main
subprocess.run([str(driver_executable), *sys.argv[1:]], env=my_env)
File "/usr/local/lib/python3.9/subprocess.py", line 501, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/local/lib/python3.9/subprocess.py", line 947, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/local/lib/python3.9/subprocess.py", line 1819, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/home/pc/tiktokbot/TikTok-Api/venv/lib/python3.9/site-

packages/playwright/driver/playwright-cli'

Also same with python 3.8

@yury-s
Copy link
Member

yury-s commented Dec 23, 2020

in docker everyting was ok till:

unable to execute 'i686-linux-gnu-gcc': No such file or directory
error: command 'i686-linux-gnu-gcc' failed with exit status 1

Command "/root/dev3.8/bin/python3.8 -u -c "import setuptools, tokenize;file='/tmp/pip-build-b2fxm52c/greenlet/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-wawd5ytc-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/dev3.8/include/site/python3.8/greenlet" failed with error code 1 in /tmp/pip-build-b2fxm52c/greenlet/

Can you upload full script that you run in Docker? Otherwise it's hard to tell what's going on there. Docker environment is repeatable so if it fails for you it will fail for others as well.

@mxschmitt
Copy link
Member

@mikegrep are you running it on a Raspberry PI because it is i368? Playwright and Playwright for Python does not support this architecture.

@mikegrep
Copy link
Author

@mxschmitt No is lapotop pc i386.
@yury-s I run this steps witch you tell me.It was not any special script I just try to install it from your descrcription.pip version 9.0.1 I try with upgradet version of pip 20.01 also Some mad errors showinng for greenlet and paywright.Anyway I need it for https://github.com/davidteather/TikTok-Api I try after installing python3.8 pip install TikTok-Api same result.If you need more info from me tell me what to send.

error: invalid command 'bdist_wheel'

Failed building wheel for playwright
error: invalid command 'bdist_wheel'

Failed building wheel for greenlet
c src/greenlet/greenlet.c -o build/temp.linux-i686-3.8/src/greenlet/greenlet.o unable to execute 'i686-linux-gnu-gcc': No such file or directory error: command 'i686-linux-gnu-gcc' failed with exit status 1

Doker:

uname -a
Linux f94de5f4e365 4.15.0-128-generic #131-Ubuntu SMP Wed Dec 9 06:53:22 UTC 2020 i686 i686 i686 GNU/Linux

@mxschmitt
Copy link
Member

@mikegrep only the Linux x86_64 architecture is currently supported (64 bit). Thats the reason why it's not working.

@mikegrep
Copy link
Author

I will accept this hope soon to support and 32bit systems

@nileshpandey3
Copy link

I am still getting this error:

My Python version 3.9.1
Pyenv virtualenv for creating virtual environment
macOS big sur [intel mac]

FileNotFoundError: [Errno 2] No such file or directory: '/.pyenv/versions/pwright_new/lib/python3.9/site-packages/playwright/driver/playwright-cli'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants