Skip to content
Advertisement

Tag: package

How to install PyPdf2 in PyCharm (Windows-64 bits)

I want to install PyPdf2 in PyCharm for Windows (64 bits) I have tried to go to SettingsProjectProject Interpreter, Then pressing the “+” sign, but It did not found PyPdf2. I already Installed it to the normal python2.7 by going to the extracted path of PyPdf2 then I run (python.exe setup.py install) I tried to install it to anaconda by

Better place to put common functions?

I’m working on building a custom package for functions I commonly use, and it has several functions that do not fit in any specific module and are used by several modules. I’ve been putting them in __init__.py, and it works, but I’ve seen many tutorials that recommend a very small __init__.py. Is there any better place I can put them?

Pip Install hangs

I currently have Python 3.5 on my Windows machine. I’m trying to install a Python package using the command “pip install” but as soon as I hit enter nothing happens. The action hangs for such a long time and when I try to exit the command line, it freezes. How do I get pip install to work? Answer @JBernardo ‘s

How do I list the files inside a python wheel?

I’m poking around the various options to setup.py for including non-python files, and they’re somewhat less than intuitive. I’d like to be able to check the package generated by bdist_wheel to see what’s actually in it–not so much to make sure that it will work (that’s what tests are for) but to see the effects of the options I’ve set.

NLTK: Package Errors? punkt and pickle?

Basically, I have no idea why I’m getting this error. Just to have more than an image, here is a similar message in code format. As it is more recent, the answer of this thread has already been mentioned in the message: Answer Perform the following: Then when you receive a window popup, select punkt under the identifier column which

Python 3: ImportError “No Module named Setuptools”

I’m having troubles with installing packages in Python 3. I have always installed packages with setup.py install. But now, when I try to install the ansicolors package I get: I have no idea what to do because I didn’t have setuptools installed in the past. Still, I was able to install many packages with setup.py install without setuptools. Why should

Can’t import my own modules in Python

I’m having a hard time understanding how module importing works in Python (I’ve never done it in any other language before either). Let’s say I have: Now I’m trying to get something like this: However, I’m definitely doing something wrong as Python can’t see that myapp is a module: Answer In your particular case it looks like you’re trying to

Sibling package imports

I’ve tried reading through questions about sibling imports and even the package documentation, but I’ve yet to find an answer. With the following structure: How can the scripts in the examples and tests directories import from the api module and be run from the commandline? Also, I’d like to avoid the ugly sys.path.insert hack for every file. Surely this can

What is __init__.py for?

What is __init__.py for in a Python source directory? Answer It used to be a required part of a package (old, pre-3.3 “regular package”, not newer 3.3+ “namespace package”). Here’s the documentation. Python defines two types of packages, regular packages and namespace packages. Regular packages are traditional packages as they existed in Python 3.2 and earlier. A regular package is

Advertisement