This topic was automatically generated from Slack. You can find the original thread here.
How do i specify which pytube package version in python code?
This topic was automatically generated from Slack. You can find the original thread here.
How do i specify which pytube package version in python code?
i tried the following code but error occurs
import pipedream.pypi.pip_install("pytube==12.0")
Any help? since the pytube version 11.0.0 has some bug and been fixed in 12.0. so i was trying to switch to pytube 12.0
Hi, I think your question is a great case for Pipedream bot to help. I’ll pass your question to the Pipedream bot now. Please feel free to ask it any question
How do i specify which pytube package version in python code?
i was actully following bot’s instruction…
but no luck
To specify a specific version of the pytube
package in your Python code, you can use the pipedream.pypi.pip_install()
function. However, you should use it within a Python code step in a Pipedream workflow, not as an import statement. Here’s an example: import pipedream pipedream.pypi.pip_install("pytube==12.0") # Your code using the pytube package
Add this code to a Python code step in your Pipedream workflow, and it will install the specified version of the pytube
package.
the code you provide does not work
import pipedream
pipedream.pypi.pip_install("pytube==12.0")
I apologize for the confusion earlier. It seems I misunderstood your question. If you want to specify a specific version of the pytube
package in your Python code, you should use pip
to install the package with the desired version. You can do this in your terminal or command prompt: bash pip install pytube==12.0
After installing the specific version, you can use it in your Python code: ```
import pytube # Your code using the pytube package
i dont think it’s possible to run pip in pipedream?
could you try Pipedream magic comment
# pipedream add-package pytube==12.0
Or
# pipedream add-package pytube@12.0
still the same…
tried both command
Then I think it is not possible to specify the python package version. I would recommend to the latest version, or use another library if you can’t
thanks. i’ll see if there any alternatives
specify import python package version in pipedream python code step