PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, July 22, 2022

[FIXED] How can I run an exec file that ouputs a csv without using `--user` in Mac?

 July 22, 2022     command-line-interface, exec, pyinstaller, python     No comments   

Issue

I created an executable on my Mac that runs Python code. It creates a csv file.

When I run the file on its own without freezing it using Pyinstaller, it works fine on both Windows and Mac. Then, when I do freeze it, it works fine, but it won't output the csv file on Mac (it does on Windows).

It will only work if I run the exec file in the CLI with --user.

I've already tried giving it permissions in the System Preferences, and in the Sharing & Permissions section of the info window. To no avail.

Is there anything I may have overlooked that others may know about?

Thanks, in advance!


Solution

It turns out that the file was being output in the user folder and not in the same folder as the exec file.

For those of you working on Python scripts and freeze them using Pyinstaller, remember that files that you output are placed in your user folder on Mac.



Answered By - Bennybear
Answer Checked By - Pedro (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home
View mobile version

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing