Closed oroppas closed 3 years ago
@oroppas package installation outside of virtualenv is not yet supported well. Can you reproduce the problem in a virtualenv? I could install pyrsistent
fine (I had to do pip install wheel
first, but I believe that's expected in a virtualenv created by venv
).
@msimacek I still have the problem. What is your pip version? Mine is
graalpython -m pip --version
pip 21.1.3 from /home/ryuta/.local/lib/python3.8/site-packages/pip (python 3.8)
(venv)
Mine is: pip 20.1.1 from /home/msimacek/git/graalpython/venv/lib/python3.8/site-packages/pip (python 3.8)
. That's the one we ship that got copied into the virtualenv. Yours seems to be from you user-site, not from the virtualenv. How did you create the virtualenv? Did you set PYTHONPATH
?
My bad. I forgot to set PYTHONPATH
to lib/python3.8/site-packages
in venv
. Now
graalpython -m pip --version
pip 20.1.1 from /home/ryuta/venv/lib/python3.8/site-packages/pip (python 3.8)
(venv)
Yes, graalpython -m pip install pyrsisten
works
graalpython -m pip install pyrsistent
Requirement already satisfied: pyrsistent in ./packages/graalvm/graal/graal/sdk/mxbuild/linux-amd64/GRAALVM_8052F32AFF_JAVA11/graalvm-8052f32aff-java11-21.3.0-dev/languages/python/lib/python3.8/site-packages (0.17.3)
WARNING: You are using pip version 20.1.1; however, version 21.1.3 is available.
You should consider upgrading via the '/home/ryuta/local/graal/languages/python/bin/graalpython -m pip install --upgrade pip' command.
(venv)
It seems that we get KeyError: PEP517_BUILD_BACKEND
if we use --user
option:
graalpython -m pip install --user pyrsistent
Collecting pyrsistent
WARNING: Cache entry deserialization failed, entry ignored
Downloading pyrsistent-0.18.0.tar.gz (104 kB)
|████████████████████████████████| 104 kB 1.4 MB/s
Looking for Graal Python patches for pyrsistent
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /home/ryuta/local/graal/languages/python/bin/graalpython /home/ryuta/venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpwid1_yl2
cwd: /tmp/pip-install-e5r45nej/pyrsistent
Complete output (12 lines):
Traceback (most recent call last):
File "/home/ryuta/venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module '_in_process.py'>
main()
File "/home/ryuta/venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/ryuta/venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 108, in get_requires_for_build_wheel
backend = _build_backend()
File "/home/ryuta/venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 83, in _build_backend
ep = os.environ['PEP517_BUILD_BACKEND']
File "/home/ryuta/packages/graalvm/graal/graal/sdk/mxbuild/linux-amd64/GRAALVM_8052F32AFF_JAVA11/graalvm-8052f32aff-java11-21.3.0-dev/languages/python/lib-python/3/os.py", line 675, in __getitem__
raise KeyError(key) from None
KeyError: PEP517_BUILD_BACKEND
----------------------------------------
ERROR: Command errored out with exit status 1: /home/ryuta/local/graal/languages/python/bin/graalpython /home/ryuta/venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpwid1_yl2 Check the logs for full command output.
You shouldn't use --user
in a virtualenv, not even in CPython. I'm surprised it let you do that. For me, it says: ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.
Ah. I aliased graalpython
to the original installation and every time I type graalpython
it did not pick up graalpython
under venv/bin
. Now
./venv/bin/graalpython -m pip --version
pip 20.1.1 from /home/ryuta/venv/lib/python3.8/site-packages/pip (python 3.8)
(venv)
and I see the expected behavior of pip
./venv/bin/graalpython -m pip install --user pyrsistent
ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.
WARNING: You are using pip version 20.1.1; however, version 21.1.3 is available.
You should consider upgrading via the '/home/ryuta/venv/bin/graalpython -m pip install --upgrade pip' command.
(venv)
However, I'm still perplexed by the same error
./venv/bin/graalpython -m pip install pyrsistent
Collecting pyrsistent
WARNING: Cache entry deserialization failed, entry ignored
Downloading pyrsistent-0.18.0.tar.gz (104 kB)
|████████████████████████████████| 104 kB 2.1 MB/s
Looking for Graal Python patches for pyrsistent
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /home/ryuta/venv/bin/graalpython /home/ryuta/venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpudhtwlln
cwd: /tmp/pip-install-8gfsfqqf/pyrsistent
Complete output (12 lines):
Traceback (most recent call last):
File "/home/ryuta/venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module '_in_process.py'>
main()
File "/home/ryuta/venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/ryuta/venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 108, in get_requires_for_build_wheel
backend = _build_backend()
File "/home/ryuta/venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 83, in _build_backend
ep = os.environ['PEP517_BUILD_BACKEND']
File "/home/ryuta/packages/graalvm/graal/graal/sdk/mxbuild/linux-amd64/GRAALVM_8052F32AFF_JAVA11/graalvm-8052f32aff-java11-21.3.0-dev/languages/python/lib-python/3/os.py", line 675, in __getitem__
raise KeyError(key) from None
KeyError: PEP517_BUILD_BACKEND
----------------------------------------
ERROR: Command errored out with exit status 1: /home/ryuta/venv/bin/graalpython /home/ryuta/venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpudhtwlln Check the logs for full command output.
WARNING: You are using pip version 20.1.1; however, version 21.1.3 is available.
You should consider upgrading via the '/home/ryuta/venv/bin/graalpython -m pip install --upgrade pip' command.
Jul 20, 2021 9:46:25 AM org.graalvm.shadowed.org.jline.utils.Log logr
WARNING: Task failed
java.io.IOException: Cannot run program "stty": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
at org.graalvm.shadowed.org.jline.utils.ExecHelper.exec(ExecHelper.java:35)
at org.graalvm.shadowed.org.jline.terminal.impl.ExecPty.doGetConfig(ExecPty.java:175)
at org.graalvm.shadowed.org.jline.terminal.impl.ExecPty.getAttr(ExecPty.java:87)
at org.graalvm.shadowed.org.jline.terminal.impl.ExecPty.doSetAttr(ExecPty.java:93)
at org.graalvm.shadowed.org.jline.terminal.impl.AbstractPty.setAttr(AbstractPty.java:29)
at org.graalvm.shadowed.org.jline.terminal.impl.AbstractPosixTerminal.doClose(AbstractPosixTerminal.java:76)
at org.graalvm.shadowed.org.jline.terminal.impl.PosixSysTerminal.doClose(PosixSysTerminal.java:95)
at org.graalvm.shadowed.org.jline.terminal.impl.AbstractTerminal.close(AbstractTerminal.java:95)
at org.graalvm.shadowed.org.jline.utils.ShutdownHooks.runTasks(ShutdownHooks.java:55)
at org.graalvm.shadowed.org.jline.utils.ShutdownHooks.access$000(ShutdownHooks.java:21)
at org.graalvm.shadowed.org.jline.utils.ShutdownHooks$1.run(ShutdownHooks.java:36)
at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:567)
at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
Caused by: java.io.IOException: error=2, No such file or directory
at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VA_LIST:Ljava_io_IOException_2_0002e_0003cinit_0003e_00028Ljava_lang_String_2_00029V(JNIJavaCallWrappers.java:0)
at java.lang.ProcessImpl.forkAndExec(ProcessImpl.java)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:340)
at java.lang.ProcessImpl.start(ProcessImpl.java:271)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
... 14 more
(venv)
@msimacek Could you suggest me the best way to debug this error? Thank you.
I tried it using SVM (I was using JVM before) and now I can reproduce it too, it seems like some SVM-specific problem. I'll try to debug it
I found the cause - a recent change in running module initialization caused os.environ
to be always empty under SVM.
Fixed by bec9b84c6cf7c0af4b0c2049118843c789133536
graalpython
can install packages ofwheel
. However, packages ofsdist
fails.Cython
numpy
pyrsistent