Python venv only?
See original GitHub issueHey, so I downloaded the library and tried writing a small python program to do the scripts you mentioned in the tutorial. But nothing runs. Newspaper is found but beyond that, nothing.
Error for proof:
Traceback (most recent call last):
File "/newspaper.py", line 1, in <module>
import newspaper
File "/newspaper.py", line 3, in <module>
cnn_paper = newspaper.build('http://cnn.com')
AttributeError: 'module' object has no attribute 'build'
[Finished in 0.0s with exit code 1]
Issue Analytics
- State:
- Created 10 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
venv — Creation of virtual environments — Python 3.11.1 ...
Creates the environment directory and all necessary subdirectories that don't already exist, and returns a context object. This context object is just a...
Read more >How to install a python module in ONLY virtualenv?
first, activate virtualenv then install python modules using pip. please share a screenshot. – user2623906. Feb 16, 2017 at 9:48.
Read more >Python Virtual Environments: A Primer
In this tutorial, you'll learn how to work with Python's venv module to create and manage separate virtual environments for your Python ......
Read more >Virtualenv and venv: Python virtual environments explained
Convenient toolkits for everything from ingesting and formatting data to high-speed math and machine learning are just an import or pip install ...
Read more >A Guide to Python's Virtual Environments |
venv # There it is! ♻️ Reminder: A virtual environment is itself a directory. The only thing left to do is to “activate”...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
WAIT, i’m almost certain I know your issue. Did you name your script
newspaper.py
? If you did, what you are doing certainly won’t work. Change the name. Also, once again, use virtualenv.NICE!! I’d love for some more contribs from you for sure. And also i’d like to contribute to your repo about python modules, just email & contact me when it is up, or add me as a contributor so I can merge.
Glad you got this to work!