question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Python venv only?

See original GitHub issue

Hey, 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:closed
  • Created 10 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
codelucascommented, Jan 31, 2014

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.

0reactions
codelucascommented, Jan 31, 2014

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found