question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dear

I am trying to use your pkg to make a portable app of my python script (tkinerer, selenium, seleniumbase) but for some reason I cannot

here is my van.py

import pyvan

OPTIONS = {
      "main_file_name": "main.py",
      "show_console": True,
      "use_existing_requirements": True,
      "python_version": "3.8.10",
      "download_missing_embedded_files": True,
      "use_pipreqs": True,
      "install_only_these_modules": [],
      "exclude_modules": [],
      "include_modules":['selenium', 'tqdm', 'tinkerer', 'seleniumbase', 'validators'],
      "path_to_get_pip_and_python_embedded_zip": "",
      "build_dir": "dist",
      "pydist_sub_dir": "pydist",
      "source_sub_dir": "sources",
      "icon_file": './logo.ico',
}

pyvan.build(**OPTIONS)

my repo structure is as follows

├── requirements.txt
├── van.py
├── main.py
├── logo.ico
├── web_actions_recorder
|         ├── main.py
|         ├── __init__.py
└── README.md

and i run the following in my terminal pyvan van.py and I get the following error trace code

===PYVAN BUILD CONFIGURATION===
Input dir: C:\SVC\web-actions-recorder
Build dir: C:\SVC\web-actions-recorder\dist
Python distribution will be installed in: C:\SVC\web-actions-recorder\dist\pydist
App source code will be installed in: C:\SVC\web-actions-recorder\dist
===REQUIREMENTS===
pyvan will try to resolve requirements for you using pipreqs and/or pip freeze:
use_pip_reqs: True
include_modules: ()
exclude_modules: ()
===BUILD OPTIONS===
pyvan will attempt to install python version: 3.8.10
requirements will be installed without additional pip arguments
===EXE FILE===
pyvan will generate an exe file for you in C:\SVC\web-actions-recorder\dist
pyvan will use the following settings:
main_file_name: van.py
show_console: True
no icon file was set.

===START PYVAN BUILD===
Resolved python_version 3.8.10: (3, 8, 10)
Using Python-3.8.10 from:
 C:\Users\Sheikh\Downloads\get-pip.py
 C:\Users\Sheikh\Downloads\python-3.8.10-embed-amd64.zip
Existing build directory found, removing contents... C:\SVC\web-actions-recorder\dist
Searching modules needed using 'pipreqs'...
Running command:  pipreqs C:\SVC\web-actions-recorder --force --ignore dist --savepath C:\SVC\web-actions-recorder\dist\requirements.txt
INFO: Successfully saved requirements file in C:\SVC\web-actions-recorder\dist\requirements.txt
b''
Done!
Checking which modules to exclude or to keep
Updating C:\SVC\web-actions-recorder\dist\requirements.txt file
File C:\SVC\web-actions-recorder\dist\requirements.txt done!
Copying files from C:\SVC\web-actions-recorder to C:\SVC\web-actions-recorder\dist!
Traceback (most recent call last):
  File "c:\users\sheikh\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\sheikh\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Sheikh\AppData\Local\Programs\Python\Python37\Scripts\pyvan.exe\__main__.py", line 7, in <module>
  File "c:\users\sheikh\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "c:\users\sheikh\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "c:\users\sheikh\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\sheikh\appdata\local\programs\python\python37\lib\site-packages\click\core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "c:\users\sheikh\appdata\local\programs\python\python37\lib\site-packages\pyvan.py", line 614, in cli
    path_to_get_pip_and_python_embedded_zip="" if path_to_get_pip_and_python_embedded_zip is None else path_to_get_pip_and_python_embedded_zip
  File "c:\users\sheikh\appdata\local\programs\python\python37\lib\site-packages\pyvan.py", line 414, in build
    build_dir=build_dir
  File "c:\users\sheikh\appdata\local\programs\python\python37\lib\site-packages\pyvan.py", line 60, in put_code_in_dist_folder
    dirs_exist_ok=True
TypeError: copytree() got an unexpected keyword argument 'dirs_exist_ok'

Q1. Please any help with that? Q2. Is pyvan going to take all the libraries and packages into consideration when creating my .exe file or shall I do something else?

Thankyou for your time and efforts

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ClimenteAcommented, Nov 25, 2021

Parameter dirs_exist_ok was added on Python version 3.8 you probably have installed on your system python 3.7 or bellow. Upgrade to python 3.8 or above and it will work.

pyvan will install all packages from your requirements.txt file

0reactions
elsheikh21commented, Nov 25, 2021

I have found the solution for my problem using PyInstaller, yet I will not close this issue by myself

Read more comments on GitHub >

github_iconTop Results From Across the Web

ClimenteA/pyvan: Make runnable desktop apps from ... - GitHub
Option Default Description main_file_name required the entry point of the application install_only_these_modules pyvan will install only the modules mentioned here exclude_modules modules to exclude from bundle...
Read more >
pywin installed, but PythonWin cannot open - Stack Overflow
I installed pywin from this site. I used version pywin32-220.win-amd64-py3.6.exe, and it installed without any error.
Read more >
Polyomavirus exerts detrimental effects on renal function in ...
After kidney transplantation, polyomavirus-associated nephropathy (PyVAN) is a well-recognized problem. This study aims to evaluate the role of polyomavirus ...
Read more >
Early fulminant BK polyomavirus-associated nephropathy in ...
High-level BKPyV-viruria and BKPyV-DNAemia precede polyomavirus-associated nephropathy (PyVAN), and guide clinical management decisions.
Read more >
BK Polyomavirus‐associated nephropathy managed by ...
Abstract Background BK polyomavirus-associated nephropathy (PyVAN) is an important complication after kidney transplantation.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found