Installing IbPy to be used in spyder (anaconda) - python

I have installed Anaconda and currently using Spyder IDE.
I am trying to install a package (IbPy -> https://github.com/blampe/IbPy) so that it can be used in Spyder.
So far I tried pip install ibpy, as well as conda install ibpy, but without success since the package is not available in the anaconda repository where I would normally update and download the most common packages.
I have also tried to move the folder downloaded from GitHub to the correct site-packages folder of Anaconda (C:\Users\Username\Anaconda2\Lib\site-packages), but still it does not work.
I also tried to run the setup.py (shift + right click on the folder, open new process here, Setup.py install), but without any success.
I tried to look for a solution everywhere, but I have had no luck so far.
If someone more tech savvy than me and practical with these specific could help, it would be highly appreciated.

You need to install it from github. Use the following.
pip install https://github.com/blampe/IbPy/zipball/master

You need to do a open terminal from the Anaconda Navigator and run the command:
conda install -c tibkiss ibpy2

Related

pycharm don't see things installed with pip

From the start of using pycharm i am facing problems with working with libraries
I tried reinstalling python, pip, pycharm; adding and readding to path. I also tried using pipenv instead of virtenv.. and it worked once, but.. now again-
i use $pip install numpy |as example| in cmd window it says to be successfully installed. Go to pycharm, type 'import numpy'.. and nothing happens. I know i can download manually: go to settings and so on.. but it would be much beter if pip installed with cmd would be instantly displayed in Pycharm. Anybody, please, help.
Check if you have activated the virtual environment in which you have installed the packages. For instance you may have installed the package on Global python version and running your program on a virtual environment which will not work. So maybe try activating your virtual environment before installing the Packages.
Step 1:-
activate {name_of_pipenv}
pip install numpy

How to instal Python packages for Spyder

I am using the IDE called Spyder for learning Python.
I would like to know in how to go about in installing Python packages for Spyder?
step 1. First open Spyder and click Tools --> Open command prompt.
For more details click visit this link,
https://miamioh.instructure.com/courses/38817/pages/downloading-and-installing-packages
I am running Spyder 4.2.4 and for me following solution turned out to be working:
open tools-> preferences -> python interpreter
click 'use the following python interpreter'
point the location to local python installation, in my case : C:\Users\MYUSER\AppData\Local\Programs\Python\Python37\python.exe
Click OK and restart the kernel.
Now the pip started to work and I was able to import any package I previously installed on the cmd/python CLI.
Spyder is a package too, you can install packages using pip or conda, and spyder will access them using your python path in environment.
Spyder is not a package manager like conda,, but an IDE like jupyter notebook and VS Code.
For the latest versions of Spyder use this console
at right bottom
Note: Once you hit enter it may take some time to install and you can't see the progress until it finishes.
Else:
Open anaconda command prompt
Activate your environment: conda activate env-name
Install the package: conda install your-package-name
I have not checked if the ways described by people here before me work or not.
I am running Spyder 5.0.5, and for me below steps worked:
Step 1: Open anaconda prompt (I had my Spyder opened parallelly)
Step 2: write - "pip install package-name"
Note: I got my Spyder 5.0.5 up and running after installing the whole Anaconda Navigator 2.0.3.
I installed Basic Python IDLE(python 3.9)
As I used to Spyder. I installed a standalone Spyder from https://www.spyder-ide.org/
Then I faced problems for packages
I tried this one
pip install spyder spyder-terminal

Update anaconda failed - Entry point not found

I have just tried to update my anaconda environment to the latest version and I am now receiving errors. I opened the conda environment as an admin, and the commands issued were:
conda update conda
conda update anaconda
First command finished fine. Second command produced error:
pythonw.exe - Entry Point Not Found
The procedure entry point ?PyWinObject_FromULARGE_INTEGER##YAPEAU_object##AEAT_ULARGE_INTEGER###Z could not be located in the dynamic link library c:\ProgramData\Anaconda3\pythoncom37.dll
I have found a reference to this sort of error that requires me to copy a file libssl-1-1-x64.dll from Anaconda3/Library/bin with the one from Anaconda3/DLLs.
How to Fix Entry Point Not Found while installing libraries in conda environment
However, I do not have that file, in the source location. Is there any commands I can issue to download this file again, or somewhere online I can safely download that one file from?
Got the same error, when updating conda.
However, the file pythoncom37.dll was located in C:\Windows\System32.
Turns out the file was a left-over from a previous update of Python 3.7.5 to Python 3.8,
i.e. not related to the installation of conda itself. My guess is that conda registered with Python 3.7 and then failed to use the dll from an incompatible installation.
Solution: Removed pythoncom37.dll and pywintypes37 from C:\Windows\System32.
I had the same problem while updating tensorflow and other packages using anaconda python3 with sublime text3.
To solve this, I've deleted all the pythoncom37.dll in directory shown from the error window.
Replacing the file from other directory did not work.
Also reinstalling conda, upgrading conda, reinstalling sublimetext3 or tensorflow did not help as well.
Given that there seem to be a lot of answers and some work for for different people with different setups, python versions and circumstances, a quick summary of things to try.
Go to [envpath]\Scripts and run py pywin32_postinstall.py -install to update the pywin32 dependencies
Copy both files found in [anacondaPath]\Lib\site-packages\pywin32_system32 to C:\Windows\System32
Install pywin32 with conda instead of pip with conda install pywin32
Force pywin32 to a particular version (e.g. 224 for Python 3.7) pip install --upgrade pywin32==224
Add \Lib\site-packages\pywin32_system32 to your path environment variables
Uninstall pypiwin32 and install pywin32. pip uninstall and pip install pywin32
Download the latest Visual C++ version and restart the computer (https://support.microsoft.com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0)
Downgrade to e.g. Python 3.6 if possible for your purposes
If any of those worked, commenting which one in your case may be helpful to understand what works when:)
List item
Sorry all - the clue was in the error message. The entry on how to fix entry point led me in the right direction. but it was the pythoncom37.dll file I needed to copy.
That's what you get for blindly following instructions.
Many thanks.
When I had this error, it did not show a path for the entry point.
I tried reinstalling anaconda and it didn't resolve the issue.
I found the path by doing pip install win32, which stated the path to the library that was was in use. It turned out it was connecting to a corrupt roaming profile version, so renaming the roaming profile folder (to _OLD) resolved the issue.
Had the same problem as on the picture above, solved it using these steps.
removed the file pythoncom37.dll from the environment in question
removed the file C:\tools\Anaconda3\Library\bin\pythoncom37.dll
run conda install --force-reinstall nb_conda_kernels ipykernel
repeat per environment.
Be aware that this will also upgrade all environment packages in the active environment.
I had the same problem. But my virtual environments all worked okay, so I had a workaround:
Create a new virtual environment called 'env_base' with all standard anaconda packages
conda create -n env_base anaconda python=3.7
Activate it
conda activate env_base
Create the kernel
conda install -c anaconda ipykernel
python -m ipykernel install --user --name=env_base
Then use this virtual environment as the base jupyter notebook. You can replace your launch shortcut with the link for this one and it is as good as having the actual Jupyter notebook working with base packages.
It doesn't fix the problem, but it sidesteps it effectively.

Conda is corrupted after pip install conda

My conda is corrupted after I run command "pip install conda". Is there any way to recover it ? Thanks
Here's the error I see when running conda command
ERROR: The install method you used for conda--probably either `pip install conda`
or `easy_install conda`--is not compatible with using conda as an application.
If your intention is to install conda as a standalone application, currently
supported install methods include the Anaconda installer and the miniconda
installer. You can download the miniconda installer from
https://conda.io/miniconda.html.
Simply, follow the instructions given in the error:
Download miniconda, then run the script file by typing following command: bash <file_name.sh> e.g.
bash Miniconda3-latest-Linux-x86_64.sh.
Now reopen the terminal for the changes to take effect.
If conda is already installed on your system, you can reinstall it with the -f force option, for example,
bash Miniconda3-latest-Linux-x86_64.sh -f
To test your installation, enter the command conda --version. If installed correctly, you will see the version of conda installed.
miniconda: https://conda.io/en/latest/miniconda.html
conda troubleshooting: https://conda.io/docs/troubleshooting.html
If you are facing this problem in Virtual Machine (VM) then you have to activate the main environment by running below line of code:
source /anaconda_installation_folder_path/bin/activate
Once you are in your main environment you can work with conda.
TL;DR: nothing is corrupted, the message you're seeing is a hardcoded stub and could be fixed.
conda package manager actually can be used with regular python installation.
Update: I've been tinkering with the described method and found that you should use conda install --dry-run ... to see changes that are going to happen. Some conda packages depend on other python version, which would overwrite the installed one. There's might be a solution for this with changing conda channels or using virtualenv. I also found that --dry-run doesn't work when using local package archives.
I'll show you how to run cudatoolkit 9.1 without any Anaconda and python-3.6-amd64. I'm using cuda 9.1 from here.
Since conda is artificially tethered with Anaconda, you have to untie them.
I recommend you to backup up python installation directory you'll be working with (or use virtualenv).
Install menuinst dependency.
At the moment, it's broken from PyPi, so get if from
github. Build it and install python setup.py install
This package is problematic also in Anaconda distribution. It triggers series of requests for admin rights every time, which should be suppressed with conda ... --no-shortcuts option.
pip install pypiwin32, dependency of (1)
pip install conda, requires (1)
Move to python installation directory. ./Scripts/conda.exe should exist.
Move to ./Lib/site-packages/conda
Search directory recursively for pip_warning substring in following TEXT file types: .py, .json, .txt
Replace matching substrings pip_warning with main
Don't forget to abide the syntax of file types you'd be editing.
Now open the ./Scripts/conda.exe executable in any hex-editor and
find pip_warning, carefully overwrite it with main and wipe the
rest with spaces until bytes import main
Check for file size not have changed.
Remove any __pycache__ dirs if found in ./Lib/site-packages/conda
If you only need working conda without cuda, you're done here.
Run conda install mkl, pip install llvmlite numpy
Download packages cudatoolkit-9.1-0.tar.bz2
and numba-0.36.2.tar.bz2
and run
conda install cudatoolkit-9.1-0.tar.bz2
conda install numba-0.36.2-***.tar.bz2
Wait a little while unpacking finished.
Now try these examples, they should work and your gpu monitor show some activity. conda ... commands also do work.
With Linux, I guess instructions are the same, just would be .sh or ELF in place of .exe.
In my case, what worked was:
pip uninstall conda
and then installing miniconda
Download miniconda, then run the script file by typing following command: bash <file_name.sh> e.g. bash Miniconda3-latest-Linux-x86_64.sh -u
'-u' : update tag, used if the original conda bash paths get lost due to certain modifications in the .bashrc file

spyder/juypter not working after downgrading python

I had to download my python version from 3.5 to 3.4 because one of the packages I needed wasn't supported in 3.5. I downgraded the python version using the conda command prompt, and everything worked fine - got my package to install with all its dependencies and no conflicts. But now when I try to open Juypter notebook or Spyder, nothing happens. My IPython works just fine. I'm thinking maybe i have to downgrade Juypter and Spyder, but I'm not sure. Anyone have any ideas?
After a day of searching I finally figured it out.
I initially used
conda install python=3.4
Bad idea - ended up having to do a fresh install of anaconda to get spyder and juypter working again.
What ended up working is creating a separate environment.
conda create -n py34 python=3.4 anaconda
activate py34
... then install packages ...
This added spyder(py34), juypter(py34), and all its "py34 brothers and sisters" to my start menu. Using these new shortcuts/environment, I now have access to the packages I need by choosing the appropriate short cut. Yes, my start menu has extra python shortcuts now, but whatever - it works.
Just make sure Make sure you install the packages you're looking for before you close the anaconda console. Perfect for installing theano dependencies mingw and libpython.

Categories

Resources