Error in Installation of Module - python

I'm trying to install the module zipline into Python 2.7 on Eclipse. I'm running the file with the following but the Error SyntaxError: invalid syntax results. I need help figuring this out.
import pip
pip install zipline
Edit: I have tried pip install zipline on the Command line as seen in the picture below but to no avail.

pip is a linux command, not a [tag: python] command. Thus, exit from the python interpreter and run the pip install in your Linux interpreter and it will run fine.
After installation, open your python interpreter and run
import zipline
And it should run fine.

You need to run pip install from the command line. Please note you also need to install numpy.

Run in command line
pip install zipline
OR
sudo pip install zipline
if any permission issues
Then in file, just import it
import zipline

Related

Can't install module "Bio" in PyCharm/VirtualStudio, neither using cmd (Windows)

I'm new to using Python and after months of not using PyCharm and VirtualStudio. I needed to do some Python stuff. I don't know why, but I can't load and install any module.
I need Bio module and I can't install it:
enter image description here
I tried to install it by cmd command using:
C:\Python310\python.exe -m pip install Biopython
pip install Biopython
Other pip commands, but I got the same error
enter image description here
And this happened. I installed VisualStudio from Windows, but I can't install it yet.

Python pip module issues on Kali Linux

I am on my Kali Linux. When I run sudo python3 Storm-Breaker.py, I get an error
ModuleNotFoundError: No module named 'pyngrok'
But when I import pyngrok in an ordinary python file and then run it, it works out fine.
Please please help.
You shall install the package before using it.
Run the following command to install the package and its dependencies.
pip install pyngrok
You can try using the following command
sudo pip3 install -r requirements.txt

How do I install packages in pycharm venv?

I've been using pycharm for a while now and I haven't really run into any problems until now, I just started a new project using Pygame and I started up pycharm and found that I could no longer install pygame. I have used it before in pycharm and had no problem. When I try to use pip I get this error:
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Alarm-1202\AppData\Local\Temp\pip-install-xdvgbolk\pygame\
I have tried installing it outside pycharm and that works fine but it seems I don't have the same permissions inside the pycharm venv.
I think the issue was caused by an older version of pip which I didn't manage to fix but I could install pygame using easy_install instead.
After opening pycharm terminal:
python -m pip install -U --force-reinstall pip
pip install your_package_name

How to fix "Python quit unexpectedly" when trying to install a module through pip install? Terminal Crashes with message "zsh: abort"

I think I broke my terminal. For some reason I am unable to use pip install to install anything on my Macbook Pro.
When I try to install such as
pip install Flask
I get
zsh: abort pip install Flask
I've tried both on pip and pip, but I get the same error on both.
Now I am unable to install any python module. I thought it was due to Bash -> zsh from Catalina update but when I changed it to Bash and tried the same, I get the same result.
Any idea how I can fix this? I am unable to do any python work due to needed modules unable to being install now
setting DYLD_LIBRARY_PATH before installing any packages with pip solved the issue for me:
export DYLD_LIBRARY_PATH=/usr/local/Cellar/openssl/1.0.2t/lib
(adjust for a valid openssl path in your system)
I found the solution in this github issue.

pip is not responding in python

I run python 2.7
I did as follow but still receiving the following strange feedback, not sure why.
Import pip
pip install pandas
can someone explain to me what's the error mean?
error message I receive trying to install
pip install pandas is not a command that you run from within your Python script. It is run at the command line.
Alternatively, you can do this from within your code:
pip.main(['install', 'pandas'])
Try running pip from the command line (bash/terminal on linux/osx or cmd.exe in Windows), not from a python script.
pip install pandas
If you're not using virtualenv, you might need administrative privileges.
On Linux/OSX use sudo:
sudo pip install pandas
On Windows run Command Prompt as Administrator:
https://technet.microsoft.com/en-us/library/cc947813%28v=ws.10%29.aspx

Categories

Resources