Hi I am going interstate and will only have my laptop with me, I do not have admin rights on it and the use of Cmd is banned. I want to be able to use Pygame on my laptop. How can I install the module without command line?
If you have a C compiler, you can download the source from http://www.pygame.org/download.shtml.
If you feel comfortable with Linux, you could use a live USB drive to boot into Linux and work there (without installing anything to the actual hard drive), or you could set up a new OS inside of a virtual machine. Good luck.
Related
For my current job it would be extremely helpful to be able to configure a virtualenv with the appropiate libraries versions, and be able to run either a python project, or cells in jupyter. This is because some people at my job work with jupyter, and some with Python, and sometimes both, and this way I would have a centralized program that could run both types, which I have not found outsaid of the paid version of PyCharm, which my company does not provide.
I just learned a few days ago about Windows Subsystem for Linux, WSL, and that it can be launched from withing Visual Studio Code, so I feel like this is my best bet to achieve that dual nature of programming from just ONE program, instead of running several like in the past.
As of right now, I have a repository cloned with WSL for a git project with different ".py" files, I open it with VSC, then open the terminal inside VSC, and I can both edit the Python code, and run it on the terminal, using bash commands as I would if I were in Ubuntu (I am doing all this from windows but can switch to Ubuntu if it would mean to be able to do this type of setup).
When I run with "Run Python file in terminal", it uses the virtualenv I have previously created.
The problem is, with Jupyter, it does not detect I have the libraries installed (like Pandas for example)
Description of my process with Jupyter so far: With the WSL console, I launch a jupyter notebook &. I then connect to that server, usin the VSC option for "Specify Local or Remote Jupyter server for connections", use the "Existing" option, copy the URL, then I go to the ".ipynb" file and start running code.
If, in a Jupyter cell, I do
import os
os.environ['VIRTUAL_ENV']
I can see my virtual enviroment. If right after that, I run import pandas I get ModuleNotFoundError: No module named 'pandas'
If I do !pip freeze I can see all the libraries and right versions that I have installed in that enviroment.
I feel like I am almost there but something is missing. My guess is that import might be going to some default installed Python, and not the one from the enviroment, for some reason I am missing.
Solved by doing what this answer suggests. The rest of answers may be of help, too:
https://stackoverflow.com/a/51036073/6028947
I wrote a Python script that scrapes PDFs that are in the same directory as the file itself.
I used pyinstaller on my Mac to convert this to a onefile .exe on my MacBook Pro and it works great. However, when I try to send this file to someone else via email, it doesn't open because "it's a Windows file", despite the fact that it was compiled/bundled on a Mac. The modules I use are regex, PyPDF2, among other non-standard libraries. How do I make these executables run on different computers?
I've tried using auto-py-to-exe, but to no avail.
The executables work as built on my Mac, but when I email it to someone whose Mac does not have Python/IDLE installed, I run into a wall. If it makes a difference, I've made a version for Windows, and that works great, too.
AFAIK, you need to compile Python programs separately for each environment. If you're on Linux, give crossenv a try.
If you aren't on Linux, to build packages that work on a Mac without IDLE installed, try py2app.
You can also suggest that whoever you're sending this file to install wine, which will let them run the .exe (though installing python might be a tad easier for them.)
I have a python server application that I wish to put onto my server. I have tried to run the python scripts on my server, I moved the file with sftp and I installed the dependancies with pip. No luck, it doesn't use my modules even after I install them. It says the module I installed isn't a thing, when when I run pip again it says it is already there. I read about standalone executables a little, but I only found documentation on windows ones. I know Linux cannot run exe files, but is there something similar.
Another thing might be my unfamiliarity with pip. I use the terminal in py charm which automatically puts my pip modules into files. When I do that on my ubuntu machines there is no file created in my directory. (Feels like a problem to me)
So I don't want to leave this open in case anyone else see this and needs help. I had forgotten to install my modules, so I did that, and then to run my two programs I just use screen now to host different terminals for each program. It isn't very hard.
I don't have access to current portable python solutions, and I'd like to put a bare bone python and manually add libs on an external HDD using a Mac.
I went to python.org but the .pkg file for Mac automatically installs python locally. I am wondering if there is a solution to what I am trying to do.
The .pkg installer clearly gives the option Change Install Location...:
Try clicking the button and selecting the external drive.
I'm bringing you this issue: I'm trying to create a program to run in Windows using PyQT, to work on a pen drive. My idea is: I plug my pen drive, and everything that I need to run the program is there, including Python 3, PyQT, etc.. I don't want the user to install all the requirements, I just want one executable that install all the programs necessary and then, there will be the executable to open the program. Considering, of course, that Python 3 is not installed in this Windows Machine
Just wondering how can I do it? Do you guys have any idea?
Thanks,
Gus.
Just an idea - not sure if that would work under your specific conditions (PyQT etc), but couldn't you run it from the pen drive directly? As in create a Python virtual environment (for example using venv, with all the dependencies) on the pendrive and then call your program using the python interpreter in the installed virtual environment.
Or use the virtual environment and it's interpreter to install the dependencies?