Running a python script through screen but it involves a virtual environment.

I’m very very new to this. I have never used ubuntu before yesterday. I purchased a droplet through digital ocean and I setup the server. I installed python and all of the needed libraries for the script (it’s a simple twitter bot). I i created all the files inside a virtual environment… I think… I followed this guide. It was very helpful. So, I created these files, two of them. One .txt and one was .py . the Python file would take sentences from the txt file and send them to twitter basically. I am trying to run this script 24/7. I googled around and came across this thread . I was following what the user Mohensen stated, I was testing out my directory and things but I cant seem to access my python file. the path I was testing was: environments/my_env/ I tried this and it stated “No such file or directory.” I tested it by adding /bin and /activate (both of them were required to access the files when i created them, I’m not sure why, but I had to type them) and it still did not work.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Solved! I saved the files inside of the envrionments directory not the bin directory!