atom-community / atom-community/atom-script

Atom Editor's Script package can't find libraries installed by pipenv

Open
#2,134 0 comments 0 reactions 0 assignees View on GitHub
installation
Dominant language
JavaScript
Stars
730
Forks
264
PR merge metrics
No merged PRs in 30d

Description

I use the Script package to run codes in Atom editor. Recently I started using pipenv to create virtual environments. I can easily run the code in terminal by typing
`pipenv shell python3 name_of_the_script_file.py `
but when I try the Script package, it doesn't recognize the virtual environment.
I tried adding `pipenv shell` in the "Run options" dialogue boxes but I still get errors although I'm already in the virtual environment's directory.
here is a simple code:
```
from bs4 import BeautifulSoup
import requests

with open('simple.html', 'r') as html_file:
soup=BeautifulSoup(html_file, 'lxml')

print(type(soup))
```
![image](https://user-images.githubusercontent.com/37688424/81678065-a9c8ea80-9451-11ea-953d-c1bddddd92a2.png)
output from Script

![image](https://user-images.githubusercontent.com/37688424/81678352-d11fb780-9451-11ea-8467-03814c1146d9.png)
output from terminal

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the example in the Atom Script package, using its Run options and the shown `pipenv shell python3 name_of_the_script_file.py` command for comparison. Check behavior with `simple.html` and the listed BeautifulSoup and requests imports; done means the package runs the script with libraries installed in the pipenv environment.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.